Closed paro-paro closed 6 months ago
This is fixed in v0.19.0
.
Updated repro: https://stackblitz.com/edit/github-yd3jt3-9mmv9s?file=package.json
Hi @davidmyersdev
Thanks a lot for the quick fix. The trailing slash issue is indeed fixed in the new version. However, the nuxt production build is still failing for me with a different error from #41.
Now, the exports
object seems to be injected in the final bundle, making the app crash on production.
Reproduction: https://stackblitz.com/edit/github-yd3jt3?file=nuxt.config.ts
nuxt build
and nuxt preview
will return an "exports is not defined" error.The reproduction uses nuxt 3.8.2 (which is the version I am currently using) but I have also tested the latest 3.9.0 release (which leverages vite 5.x) and no luck either.
Let me know if I could expect any help from the plugin side.
Thanks in advanced!
Hi @davidmyersdev
Just posting here that I was able to fix my issue thanks to the awesome guys at nuxt. In the end, it was just a matter of targeting a different polyfill library in the aliasing property.
Here is some context in case you find it useful.
Thanks for the plugin!!
@davidmyersdev I would be more than happy to help if you like to migrate the polyfill backend to unenv, it should make the plugin much more usable.
Hey @pi0! I would love to migrate to unenv
! I'll take a look and see if I have any questions for you.
@davidmyersdev
My original post here
As pointed in the previous thread, seems like the plugin fails due to an upstream dependency trying to import
process/
instead ofprocess
.Doing some digging I detected that the conflicting dependency was
readable-stream
which is a NodeJS official package. Looks like the trailing slash/
syntax is intended... as explained here.Do not really understand the rationale behind it since it feels like a workaround for browserify...
In any case, it would be great if we can expect a fix from the plugin side.
Thanks a lot for your help!