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
what is the difference to rollupOptions.output.manualChunks?
vite.config.js manualChunks
import { defineConfig } from "vite" export default defineConfig({ build: { rollupOptions: { output: { manualChunks(id) { if (id.includes('/node_modules/@codemirror/')) { return 'codemirror'; } console.log("id", id) if (id.includes('/node_modules/')) { return 'vendor'; } }, } }, }, })
vite.config.js chunkSplitPlugin
import { defineConfig } from "vite" import { chunkSplitPlugin } from 'vite-plugin-chunk-split' export default defineConfig({ plugins: [ chunkSplitPlugin({ //strategy: 'default', customSplitting: { 'codemirror': [/\/node_modules\/@codemirror\//], } }) ], })
result manualChunks
dist/index.js 11.26 KiB / gzip: 4.35 KiB dist/vendor.js 187.72 KiB / gzip: 40.70 KiB dist/codemirror.js 369.08 KiB / gzip: 116.12 KiB
result chunkSplitPlugin
dist/index.js 11.29 KiB / gzip: 4.36 KiB dist/vendor.js 187.66 KiB / gzip: 40.72 KiB dist/codemirror.js 369.08 KiB / gzip: 116.12 KiB dist/__commonjsHelpers__.js 0.13 KiB / gzip: 0.09 KiB
The text was updated successfully, but these errors were encountered:
Yes, the feature is by design to avoid circular dependency problem in manualChunks
manualChunks
Sorry, something went wrong.
i fixed my customSplitting regex now manualChunks and chunkSplitPlugin give the same result
No branches or pull requests
what is the difference to rollupOptions.output.manualChunks?
vite.config.js manualChunks
vite.config.js chunkSplitPlugin
result manualChunks
result chunkSplitPlugin
The text was updated successfully, but these errors were encountered: