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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
v-shex-msft
Community Support
Community Support

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.