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
Hello! I ran into a build problem in product mode my project vite + react when adding a library @apidevtools/json-schema-ref-parser. I create issue in vite.
I added plugins @esbuild-plugins/node-modules-polyfill and @esbuild-plugins/node-globals-polyfill in vite.config for development mode it's help me, but it's dont work for production mode. I tried add rollup plugin with nodejs rollup-plugin-polyfill-node dependencies for production mode, but it's not help me.
May be do you know how to resolve this problem?
my vite.config.ts and my start project
import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' import NodeModulesPolyfill from '@esbuild-plugins/node-modules-polyfill' import NodeGlobalsPolyfill from '@esbuild-plugins/node-globals-polyfill' import nodePolyfills from 'rollup-plugin-polyfill-node' export default defineConfig(({command, mode}) => { return { plugins: [ react(), ], optimizeDeps: { esbuildOptions: { plugins: [ NodeModulesPolyfill(), NodeGlobalsPolyfill({ buffer: true, process: true, }), ], }, }, build: { sourcemap: true, emptyOutDir: true, rollupOptions: { plugins: [ nodePolyfills(), ], }, }, server: command === 'serve' ? {open: '/'} : undefined, } })
The text was updated successfully, but these errors were encountered:
@yura007rt can you see if this fix helped?
Sorry, something went wrong.
No branches or pull requests
Hello! I ran into a build problem in product mode my project vite + react when adding a library @apidevtools/json-schema-ref-parser. I create issue in vite.
I added plugins @esbuild-plugins/node-modules-polyfill and @esbuild-plugins/node-globals-polyfill in vite.config for development mode it's help me, but it's dont work for production mode. I tried add rollup plugin with nodejs rollup-plugin-polyfill-node dependencies for production mode, but it's not help me.
May be do you know how to resolve this problem?
my vite.config.ts and my start project
The text was updated successfully, but these errors were encountered: