Implement ES6 export file
boar-is opened this issue · 4 comments
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
This sounds like it may be related to #218 (comment), where a workaround was found. Maybe that will work for you?
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).
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.
A version with module has been released by now, so I'm going to close this.