Skip to content

Flatpickr ESM Warning #3191

@arnsimgue

Description

@arnsimgue

Hello everyone,

when we build our Angular app with Carbon Design we get these warnings:

▲ [WARNING] Module 'flatpickr/dist/plugins/rangePlugin' used by 'node_modules/carbon-components-angular/fesm2020/carbon-components-angular-datepicker.mjs' 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 'flatpickr/dist/l10n/index' used by 'node_modules/carbon-components-angular/fesm2020/carbon-components-angular-datepicker.mjs' is not ESM

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

We use this Carbon, Node and Angular versions:

    "@carbon/icons": "11.69.0",
    "@carbon/styles": "1.92.0",
    "carbon-components-angular": "5.62.1",

    Angular CLI: 20.3.6
    Node: 24.10.0

Regarding flatpickr:
I checked the flatpickr GitHub and found this issue and the associated PR that were adding the ESM support back in 2020. From the information I found [email protected] uses the newest [email protected], so this could be an issue on the Carbon Design side.

Maybe related issue:
I found this closed issue that could be related, since the warnings were also about flatpickr being CommonJS.

Are the warnings we get a known issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions