Replies: 1 comment
-
You can use rollupOptions's manualChunks to manage what dependencies do not get bundled, or bundled separately. //vite.config.js
build: {
rollupOptions: {
output: {
manualChunks: {
lodash: ['lodash']
}
}
}
} If you want each dependency to be bundled separately, here's a blog with a nice solution. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm looking for a solution that lets me ship "raw" source files without bundling them. I saw that this Vite plugin does exactly what I'm looking for during development:
dist/vendor/deps/*.js
)But once I run the final
build
command, I get:Is it possible to preserve the 1:1 file structure and disable bundling in the
build
step?Context: I followed this guide with Vite 2, TypeScript: https://crxjs.dev/vite-plugin/getting-started/vanilla-js/create-project
Beta Was this translation helpful? Give feedback.
All reactions