davidmyersdev / vite-plugin-node-polyfills

A Vite plugin to polyfill Node's Core Modules for browser environments.
MIT License
263 stars 17 forks source link

Cannot rollup in NuxtJS 3 #7

Closed gaminglifex closed 1 year ago

gaminglifex commented 1 year ago

I am trying put third-party markdown editor into my project, and it is lucky to have this plugin to solve the problem: "Module "stream" has been externalized for browser compatibility. Cannot access "stream.Readable" in client code."

However, when I am trying to build my project for production, there is an error occur: image

I am able to build my project without adding this plugin to vite config, but all my markdown components & Github Octokit modules will not be functional.

Therefore, I would like to know if there is any solution regarding to my problem?

davidmyersdev commented 1 year ago

Hey @gaminglifex. Thanks for raising this issue. Do you have a link to your project or another example project that I can use to reproduce this error?

gaminglifex commented 1 year ago

@voracious Thank you for your response! If you don't mind, I can create a repo and invite you as Contributor to have the full access of my code 😄

davidmyersdev commented 1 year ago

@gaminglifex that works for me! As long as I can reproduce it, I should be able to get a fix together.

gaminglifex commented 1 year ago

@voracious Thank you! I have written a simple note about my proj inside that repo for you. 👍

davidmyersdev commented 1 year ago

@gaminglifex thanks so much for the example! A recent PR fixed a similar problem, and I verified it also fixed the error you encountered. If you update to v0.5.0, things should be working!

gaminglifex commented 1 year ago

Thank you!