Open jamesdh opened 1 year ago
FWIW, vite-plugin-node-polyfills got ketting working w/ Vite.
Thank you, this is helpful. Webpack will actually use a browser-specific build of Ketting that doesn't have the sax dependency, but it looks like Vite doesn't do this. We do a number of optimizations for browsers that make the build a lot leaner by relying on browser APIs when possible.
So i want to keep this open with the intention of figuring out how we can get Vite make better decisions.
I recently converted one of our web apps from Create React App to Vite. Now in the process of replacing some legacy code w/ ketting. Ketting worked fine in another CRA app of ours, but when attempting to use the latest (8.0.0-alpha.2) w/ Vite, I get the following on startup:
Per Vite:
I was able to simply
yarn add stream
and get around this. I don't fully understand the issue or Vite's suggestion, but I thought I'd raise this nonetheless.