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

{issue]: Warning - CommonJS or AMD dependencies can cause optimization bailouts #48

Open
Grishpan opened this issue Dec 19, 2022 · 1 comment

Comments

@Grishpan
Copy link

Grishpan commented Dec 19, 2022

This library hasn't been updated in a while but I was still wondering if this is a misuse on my side or not.
So I'm working with angular, in my typescript file I'm adding: import t from 'typy'; and during build time I'm getting this warning:

Warning: ...\ui-branding.service.ts depends on 'typy'. CommonJS or AMD dependencies can cause optimization bailouts.

I know that I can add it to allowedCommonJsDependencies in angular.json to suppress the issue but am still wondering if this dependency can be packaged with ECMAScript for better optimization and overall bundle size.

@flexdinesh
Copy link
Owner

Would be nice to be able to bundle both ESM and CJS during build. If someone can put up a PR that would be awesome.

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