Skip to content

Use ECMAScript modules instead of commonjs/amd #67

@sander1095

Description

@sander1095

Hello!

We use this package in our Angular 11 project. During the build we get a warning:

FILE_NAME_HERE depends on 'jschardet'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

The recommendation is as follows:

It is recommended that you avoid depending on CommonJS modules in your Angular applications. Depending on CommonJS modules can prevent bundlers and minifiers from optimizing your application, which results in larger bundle sizes. Instead, it is recommended that you use ECMAScript modules in your entire application. For more information, see How CommonJS is making your bundles larger.


Would it be possible to do this? this would make our application size smaller and I believe this is also a more modern approach!

I am looking forward to your reply!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions