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

About ES Modules #36

Open
Inexad opened this issue Oct 8, 2022 · 2 comments
Open

About ES Modules #36

Inexad opened this issue Oct 8, 2022 · 2 comments

Comments

@Inexad
Copy link

Inexad commented Oct 8, 2022

Hi,

Wouldn't a solution to fix the:

WARNING in node_modules/ngx-filesaver/ivy_ngcc/fesm2015/ngx-filesaver.js depends on file-saver. CommonJS or AMD dependencies can cause optimization bailouts.

To use the package: file-saver-es instead?

@cipchk
Copy link
Owner

cipchk commented Oct 8, 2022

file-saver-es has not been updated for two years and is not recommended; but if you still want to, you can use it like this:

npm install file-saver-es ngx-filesaver --save

But I'm not sure it will work.

In fact, I prefer to configure in angular.json:

"allowedCommonJsDependencies": [
   "file-saver"
],

There is a lot of discussion about ES Modules of file-saver, but nothing seems to be going on:

@Inexad
Copy link
Author

Inexad commented Oct 8, 2022

I see! I did a bad research before posting. Sorry.
Thanks for quick reply.

@cipchk cipchk changed the title Optimization baleouts About ES Modules Oct 14, 2022
@cipchk cipchk pinned this issue Oct 14, 2022
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

2 participants