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

Trying to use in Angular 16, getting "CommonJS or AMD dependencies can cause optimization bailouts." #869

Closed
motohead400 opened this issue Oct 30, 2023 · 4 comments · Fixed by #990

Comments

@motohead400
Copy link

Is it possible to have an ES6 module export version of this?

@cure53
Copy link
Owner

cure53 commented Oct 30, 2023

We're open to a PR for this if you set one up :)

@cure53 cure53 closed this as completed Nov 1, 2023
@jeroen1602
Copy link
Contributor

I found that manually adding "es2020": "./dist/purify.es.mjs", gets rid of the warning.

But I'm not sure if this is the correct method, I'm not very familiar with creating js libraries.

I also found what I believe is the order that the Angular compiler uses to find the entry point for future reference

https://github.com/angular/angular-cli/blob/d6a34034d7489c09753090642ade4c606cd98ece/packages/angular/build/src/tools/esbuild/application-code-bundle.ts#L50

@cure53
Copy link
Owner

cure53 commented Sep 3, 2024

Oha, would that be worth a PR? 😄

@jeroen1602
Copy link
Contributor

jeroen1602 commented Sep 3, 2024

I'll make one.

PR has been created #990

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

Successfully merging a pull request may close this issue.

3 participants