Skip to content

Commit

Permalink
Disable chunking
Browse files Browse the repository at this point in the history
  • Loading branch information
aldwin7894 committed Jan 19, 2023
1 parent 40859d4 commit b2c9adb
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,26 @@ export default defineConfig({
cssCodeSplit: true,
target: "esnext",
sourcemap: false,
rollupOptions: {
output: {
compact: true,
manualChunks(id) {
const chunks = [
"chart.js",
"alpinejs",
"tw-elements",
"iconify-icon",
"tailwindcss",
"rails",
"turbo",
];
// rollupOptions: {
// output: {
// compact: true,
// manualChunks(id) {
// const chunks = [
// "chart.js",
// "alpinejs",
// "tw-elements",
// "iconify-icon",
// "tailwindcss",
// "@hotwired",
// "@rails",
// ];

if (chunks.some(x => id.includes(x))) {
return chunks.find(x => id.includes(x));
}
return "vendor";
},
},
},
// if (chunks.some(x => id.includes(x))) {
// return chunks.find(x => id.includes(x));
// }
// return "vendor";
// },
// },
// },
},
});

0 comments on commit b2c9adb

Please sign in to comment.