royNiladri / js-big-decimal

Work with large numbers on the client side with high precision.
https://www.npmjs.com/package/js-big-decimal
MIT License
156 stars 28 forks source link

Import errors on server side of Nuxt #125

Open zguig52 opened 8 months ago

zguig52 commented 8 months ago

Describe the bug

There is a packaging issue in the library. For SSR apps, it works on client side but not on server side (only after the build - during dev, there is no issue).

Workaround give by Nuxt team is to "transpile" it: https://github.com/nuxt/nuxt/issues/26375

To Reproduce https://stackblitz.com/edit/github-qytiun

Expected behavior Module shall be properly packaged in order to allow usage without transpiling it in Nuxt.

Additional context N/A - refer to reproduction code