xaviergonz / js-angusj-clipper

Polygon and line clipping and offsetting library (Javascript) - a port of Angus Johnson's clipper
MIT License
162 stars 19 forks source link

Support ES Modules #35

Open AlexanderMelde opened 1 year ago

AlexanderMelde commented 1 year ago

Hello Javier, when importing your script into typescript Angular projects, the following warning appears:

Warning: [file] depends on 'js-angusj-clipper/web'. CommonJS or AMD dependencies can cause optimization bailouts. For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

I have reviewed the source code here and it seems like this project is not yet a ES Module. For any modern typescript project, it would be helpful if you could provide a ES6 Module. You can read more about the benefits of ESM here and here.

Let me know if I can help during the implementation of this.

Best, Alexander