Select to view content in your preferred language

AMD modules will go away?

121
1
Jump to solution
yesterday
LefterisKoumis
Frequent Contributor

I have a straightforward question for the Esri team:

Are there any plans to phase out AMD modules in favor of exclusively using ES modules in the Esri environment? If so, is there an estimated timeline for this transition?

 

0 Kudos
1 Solution

Accepted Solutions
YannCabon
Esri Contributor

Hi!

There are currently no plans to phase out AMD modules, but we anticipate that this will eventually happen. We're actively monitoring developments in build and bundling technologies and continue to test AMD and ESM support on the CDN. Today, AMD remains very efficient for loading unbuilt applications, though that may evolve.

One factor is that we depend on tools like TypeScript, which has announced plans to deprecate AMD output in the future:
https://github.com/microsoft/TypeScript/issues/54500

Since the technology landscape can change significantly in just a few years, we want to shield your application code from potential disruptions in how modules are distributed on the CDN. That’s why we introduced the new utility function $arcgis.import() for applications without a build step. While it currently uses AMD modules under the hood, it’s designed to switch to ESM in the future without requiring changes on your side.

If you're developing your application using the AMD modules (for example, from the SDK Download) and a AMD build tool like dojo or requirejs, we recommend migrating to ES modules and modern build tools (see the getting started).

When we do move forward with deprecating AMD, we will communicate early and provide a clear deprecation period.

Yann

View solution in original post

1 Reply
YannCabon
Esri Contributor

Hi!

There are currently no plans to phase out AMD modules, but we anticipate that this will eventually happen. We're actively monitoring developments in build and bundling technologies and continue to test AMD and ESM support on the CDN. Today, AMD remains very efficient for loading unbuilt applications, though that may evolve.

One factor is that we depend on tools like TypeScript, which has announced plans to deprecate AMD output in the future:
https://github.com/microsoft/TypeScript/issues/54500

Since the technology landscape can change significantly in just a few years, we want to shield your application code from potential disruptions in how modules are distributed on the CDN. That’s why we introduced the new utility function $arcgis.import() for applications without a build step. While it currently uses AMD modules under the hood, it’s designed to switch to ESM in the future without requiring changes on your side.

If you're developing your application using the AMD modules (for example, from the SDK Download) and a AMD build tool like dojo or requirejs, we recommend migrating to ES modules and modern build tools (see the getting started).

When we do move forward with deprecating AMD, we will communicate early and provide a clear deprecation period.

Yann