Select to view content in your preferred language

Clarification needed: import from @arcgis/core node modules

275
0
10-31-2024 07:09 AM
EMiller_2
Regular Contributor

I am working in Experience Builder Developer Edition version 1.14 and have written some custom widgets.

Can someone point me to documentation or give me an explanation of the difference between formats for my module imports? I am confused about the difference between these two examples:

import * as query from "@arcgis/core/rest/query.js";
import query from "esri/rest/query";


Until recently I was using the example on line 2, but opened up my code today and Visual Studio Code was flagging it as an error. I substituted line 1 and that seems to be working fine. What is the difference, and why did this suddenly change when I was not getting any error previously?

As far as I know, ExB version 1.14 is using the Javascript SDK version 4.29.

Thank you!

0 Replies