Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
DevForDay
Frequent Visitor

Using .js files inside Power BI custom visual

Is it possible to use .js files inside a custom visual? Every time I try to make .js files that contains React component i get the following error

DevForDay_0-1707924999862.png

Also if I rename file from .js to .tsx everything works fine. I tried to install babel and diffrent types of loaders but I get the same error.

2 REPLIES 2
Anonymous
Not applicable

HI @DevForDay,

You can take look at the following link about add external library support in custom visual:

Adding external libraries to Power BI visuals - Power BI | Microsoft Learn

Regards,

Xiaoxin Sheng

This does not fix my problem. I Want to write my custom code and store it as .js file. This link is just an explanation for adding external libraries which does not fix my problem. 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.