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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

error in loading leaflet css under pbi-visuals-tools 3.0.x

I following the tutorial to migrate to the new visual tool, however when I import css from node_modules I receive the following error:

 

error in ./node_modules/leaflet/dist/leaflet.css

Module parse failed: Unexpected token (3:0)
You may need an appropriate loader to handle this file type.
| /* required styles */
|
> .leaflet-pane,
| .leaflet-tile,
| .leaflet-marker-icon,

2 REPLIES 2
v-viig
Community Champion
Community Champion

It seems there's no loader for CSS in PBIVIZ 3.0.x but there's a loader for .less files. You can workaround this issue by creating a less file and importing this file into ts file import "./src/styles.less".

 

Inside .less file you can use import for css:  @import (less) "node_modules/leaflet/dist/leaflet.css";

 

This is a temporary workaround. I'll talk to engineering team to address this issue.

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

Sir, i tried to import 

@import (less) "node_modules/leaflet/dist/leaflet.css";
in visual.less and  got the error

1 ERROR in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details)

 

any solution please tell

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.