Skip to content

Implement ES6 export file #297

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

Closed
boar-is opened this issue Jul 20, 2020 · 4 comments
Closed

Implement ES6 export file #297

boar-is opened this issue Jul 20, 2020 · 4 comments

Comments

@boar-is
Copy link

boar-is commented Jul 20, 2020

It would be great if we could import xregexp with ES6 import statement. More info here

Angular 10 prints the following error during build process:

WARNING in XXX depends on 'xregexp'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
@josephfrazier
Copy link
Collaborator

This sounds like it may be related to #218 (comment), where a workaround was found. Maybe that will work for you?

@boar-is
Copy link
Author

boar-is commented Jul 20, 2020

I have no is not a function error but a warning during build process. The build may work but the warning annoys (and it can really cause optimization bailouts).

@josephfrazier
Copy link
Collaborator

josephfrazier commented Jul 20, 2020

Oh, I think I see now. We actually do have a module field in package.json, but I don't think it's in a released version. You might be able to import from xregexp/src/index.js as a workaround, until this change gets released.

@josephfrazier
Copy link
Collaborator

A version with module has been released by now, so I'm going to close this.

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