Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ECMAScript modules instead of commonjs/amd #67

Open
sander1095 opened this issue Jul 13, 2021 · 0 comments
Open

Use ECMAScript modules instead of commonjs/amd #67

sander1095 opened this issue Jul 13, 2021 · 0 comments

Comments

@sander1095
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant