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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

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 @Anonymous,

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

Anonymous
Not applicable

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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.