Select to view content in your preferred language

simplerenderer with ESM

570
1
Jump to solution
04-01-2022 06:36 PM
LefterisKoumis
Frequent Contributor

New with ESM and API 4.x

I hit a wall trying to implement with ESM the simple renderer. What am I missing?

According to the:

https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-SimpleRenderer.html

the simplerenderer can be imported by:

LefterisKoumis_0-1648863185409.png

 

But, when I try to implement it:

LefterisKoumis_1-1648863260607.png

I get this error:

LefterisKoumis_3-1648863332911.png

 

 

 

0 Kudos
1 Solution

Accepted Solutions
ReneRubalcava
Honored Contributor

If you are going to use pure ESM via the ESM CDN, you need to add .js to filename.

https://codepen.io/odoe/pen/xxpPppQ?editors=0010

Normally when using ESM, you would use build tools that don't need the file extension.

View solution in original post

0 Kudos
1 Reply
ReneRubalcava
Honored Contributor

If you are going to use pure ESM via the ESM CDN, you need to add .js to filename.

https://codepen.io/odoe/pen/xxpPppQ?editors=0010

Normally when using ESM, you would use build tools that don't need the file extension.

0 Kudos