niksy / node-stdlib-browser

Node standard library for browser.
MIT License
189 stars 13 forks source link

docs: mention vite plugin in the guide #17

Closed haoqunjiang closed 1 year ago

haoqunjiang commented 2 years ago

Hi, thanks for the great library! I use it a lot to polyfill third-party dependencies in Vite. So I've extracted my configuration to a standalone package. And I think it's worth contributing back to the documentation. This should help save some time for new users.

Aside from the recommended setup in the README, I have also configured the optimizeDeps.esbuildOptions.plugins option in Vite, so that transitive dependencies (they are pre-bundled with esbuild) of Node.js built-ins can also be polyfilled.

I'm a member of the Vite.js team. This package is released under my personal account, but I plan to keep maintaining it in the foreseeable future. So don't worry about it becoming too outdated.

niksy commented 2 years ago

@sodatea Thanks for the contribution, this looks great!

Could you also update tests so they use your plugin instead?

And one question: do you have plans on moving this plugin to Vite organization?

niksy commented 1 year ago

I’ve added reference to this plugin in the documentation, along with similar plugins. Thanks for your effort!