smartlook / smartlook-client

Official Smartlook client for easy frontend integration.
https://smartlook.com
MIT License
28 stars 9 forks source link

Packaging ESM #39

Closed daniel-sc closed 7 months ago

daniel-sc commented 1 year ago

With current angular versions, using this lib generates the following warning:

Warning: C:\dev\src\app\auth\smartlook-helper.ts depends on 'smartlook-client'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

Would it be possible to publish it using ECMAScript modules?

amertak commented 1 year ago

Hi @daniel-sc,

we will add ESM support into our feature requests backlog.

You are however welcome to create a PR that solves this. Either ESM only package (major bump) or minor bump that supports both commonjs and esm.

daniel-sc commented 8 months ago

@amertak could you please review the PR and create a (minor) release based on the changes? (This is based on https://evertpot.com/universal-commonjs-esm-typescript-packages/ )

amertak commented 7 months ago

@daniel-sc Thanks for contribution. We added ESM support and released 9.0.0.