Question T20239
Visible to All Users

Angular 18 ESM Support

created 10 months ago

Hi Team,

I'm trying to use for surveyjs library and builder in my nx workspace which uses Angular 18. I'm using ESM instead of webpack while generating the app. While building both builder and the app I get following messages. Do we have plans to move to ESM?

▲ [WARNING] Module 'survey-creator-core' used by 'apps/form-builder/src/app/survey-creator/survey-creator.component.ts' is not ESM

CommonJS or AMD dependencies can cause optimization bailouts.
For more information see: https://angular.dev/tools/cli/build#configuring-commonjs-dependencies

▲ [WARNING] Module 'survey-core' used by 'apps/form-builder/src/app/survey-creator/survey-creator.component.ts' is not ESM

CommonJS or AMD dependencies can cause optimization bailouts.
For more information see: https://angular.dev/tools/cli/build#configuring-commonjs-dependencies

▲ [WARNING] Module 'survey-core/survey.i18n.js' used by 'apps/form-builder/src/app/survey-creator/survey-creator.component.ts' is not ESM

CommonJS or AMD dependencies can cause optimization bailouts.
For more information see: https://angular.dev/tools/cli/build#configuring-commonjs-dependencies

▲ [WARNING] Module 'survey-creator-core/survey-creator-core.i18n' used by 'apps/form-builder/src/app/survey-creator/survey-creator.component.ts' is not ESM

CommonJS or AMD dependencies can cause optimization bailouts.
For more information see: https://angular.dev/tools/cli/build#configuring-commonjs-dependencies

▲ [WARNING] Module 'survey-core' used by 'libs/survey/src/lib/survey/survey.component.ts' is not ESM

CommonJS or AMD dependencies can cause optimization bailouts.
For more information see: https://angular.dev/tools/cli/build#configuring-commonjs-dependencies

Answers approved by surveyjs Support

created 10 months ago

Hello,

Yes, we have plans to support ES modules. Here is the corresponding issue on Github - https://github.com/surveyjs/survey-library/issues/3091
We're thinking to implement this feature after v2 release, where we're going to drop KnockoutJS and Vue2 support.
But I can't promise you any exact timeframe.

Thanks, Serge
SurveyJS Team

    Comments (3)

      Thanks Serge. This is helpful. Appreciate it.

        Eagerly waiting for this, as it is increasing build sizes.

          Hi Kartik,
          Thank you for bringing this feature to our attention. We are currently working on a major update for SurveyJS Libraries (v2.0). Once completed, we plan to focus on EMS modules for our components.

          Thank you