Closed
Description
Issue
Hi!
I've recently switched from webpack to vite.
I'm running into a problem with rollup reporting
Dependency pouchdb-browser is attempting to import Node built-in module 'events'.
According to Evan You (the creator of Vue and Vite), the automatic bundling of nodejs packages will also stop working in webpack 5.
I've had a look at creating a PR to add a polyfill for the nodejs packages and add it to the browser
field of the relevant package.json files so it picks up the correct polyfills, but I have a hard time figuring out the best way of doing it.
How would we best go about fixing this issue?
Info
- Environment: browser
- Build system: webpack 5/rollup/vite
Reproduce
npm init vite-app testApp
cd testApp
npm i && npm i pouchdb-browser
npm run dev
Metadata
Metadata
Assignees
Labels
No labels