Skip to content

Commit b48be4f

Browse files
authored
Remove manual chunks and disable inlining assets (#351)
* Starting to fine tune manual chunks * Using the smallest preset for treeshaking with side effects true * Just MUI? * Forget about manual chunks and other Rollup tuning, just makes things worse
1 parent aecdebd commit b48be4f

File tree

1 file changed

+1
-22
lines changed

1 file changed

+1
-22
lines changed

vite.config.ts

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,6 @@
11
import { defineConfig } from "vite";
2-
32
import react from "@vitejs/plugin-react";
43

5-
/*
6-
Saved for later use once other libraries are being updated.
7-
function manualChunks(id : string) {
8-
if (id.includes('node_modules/react')) {
9-
return 'react';
10-
} else if (id.includes('node_modules/@material-ui')) {
11-
return 'material';
12-
} else if (id.includes('node_modules')) {
13-
return 'vendor';
14-
}
15-
}
16-
*/
17-
184
// https://vitejs.dev/config/
195
export default defineConfig({
206
plugins: [react()],
@@ -31,17 +17,10 @@ export default defineConfig({
3117
build: {
3218
outDir: "build",
3319
sourcemap: true,
20+
assetsInlineLimit: 0, // disable inlining assets
3421

3522
// When false, all CSS will be extracted into a single CSS file.
3623
cssCodeSplit: false,
3724

38-
// https://rollupjs.org/configuration-options/
39-
/*
40-
rollupOptions: {
41-
output: {
42-
manualChunks: manualChunks
43-
}
44-
}
45-
*/
4625
},
4726
});

0 commit comments

Comments
 (0)