You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I create a helper function in the utils folder. I use an external javascript package.
Code is working fine in dev environment, but when I generate the build and start it, there is an issue on server side, the library is not imported: "bigDecimal.add is not a function"
When I enforce the component to be client side only, build is OK, but I cannot use SSR for it.
Is it not the right way to import an external library and use custom functions based on it or a nuxt build issue (missing the import for the server side running code?).
Additional context
This bug is not linked to the new nuxt version. It was already there before v3.11.
@danielroe Can you please guide us how to update the package so it can be used in Nuxt without transpile? Ran into the same issue with featurevisor/featurevisor#269
Environment
On stackblitz:
On dev machine:
Reproduction
https://stackblitz.com/edit/github-qytiun?file=utils%2Fimport.ts
Describe the bug
I create a helper function in the utils folder. I use an external javascript package.
Code is working fine in dev environment, but when I generate the build and start it, there is an issue on server side, the library is not imported: "bigDecimal.add is not a function"
When I enforce the component to be client side only, build is OK, but I cannot use SSR for it.
Is it not the right way to import an external library and use custom functions based on it or a nuxt build issue (missing the import for the server side running code?).
Additional context
This bug is not linked to the new nuxt version. It was already there before v3.11.
I have read carefully the documentation here and did not found what I was doing wrong:
https://nuxt.com/docs/guide/directory-structure/utils
Logs
No response
The text was updated successfully, but these errors were encountered: