We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In a project, I use the following dependency : https://www.npmjs.com/package/minify-xml
Because it is a dependency written for a pure NodeJS project, I had to use polyfills like this :
import { defineConfig } from "vite"; import { nodePolyfills } from "vite-plugin-node-polyfills"; export default defineConfig({ plugins: [nodePolyfills({ include: ['_stream_passthrough', 'util'] })] })
Everything should work in dev mode, or when I build the project.
I have the following error :
You can find a minimal reproductible example there : https://github.com/ii02735/vite-minify-xml-bug-build
The text was updated successfully, but these errors were encountered:
Passthrough is imported from stream. So have you tried importing stream instead of _stream_passthrough?
stream
_stream_passthrough
Also try setting protocolImports: true, since it is importing Passthrough from node: protocol import.
protocolImports: true
node:
I encountered the same issue and this fixed it for me.
Sorry, something went wrong.
No branches or pull requests
Summary
In a project, I use the following dependency : https://www.npmjs.com/package/minify-xml
Because it is a dependency written for a pure NodeJS project, I had to use polyfills like this :
What I expect
Everything should work in dev mode, or when I build the project.
What I got
I have the following error :
My setup
You can find a minimal reproductible example there : https://github.com/ii02735/vite-minify-xml-bug-build
The text was updated successfully, but these errors were encountered: