Better splitting
This commit is contained in:
Vendored
+1
File diff suppressed because one or more lines are too long
Vendored
-2
File diff suppressed because one or more lines are too long
-1
File diff suppressed because one or more lines are too long
Vendored
+26
File diff suppressed because one or more lines are too long
-73
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+4
-5
File diff suppressed because one or more lines are too long
-1
File diff suppressed because one or more lines are too long
+47
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Vendored
+6
-5
@@ -5,11 +5,12 @@
|
|||||||
<link rel="icon" type="image/svg+xml" href="/phpCourse/exam/dist/vite.svg" />
|
<link rel="icon" type="image/svg+xml" href="/phpCourse/exam/dist/vite.svg" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Vite + React + TS</title>
|
<title>Vite + React + TS</title>
|
||||||
<script type="module" crossorigin src="/phpCourse/exam/dist/assets/index-_R7ZZc23.js"></script>
|
<script type="module" crossorigin src="/phpCourse/exam/dist/assets/index-Dah7eWEL.js"></script>
|
||||||
<link rel="modulepreload" crossorigin href="/phpCourse/exam/dist/assets/vendor_1_react-CXEjNhpI.js">
|
<link rel="modulepreload" crossorigin href="/phpCourse/exam/dist/assets/vendor-CKNY8FYg.js">
|
||||||
<link rel="modulepreload" crossorigin href="/phpCourse/exam/dist/assets/vendor_tanstack-BhPLOUa_.js">
|
<link rel="modulepreload" crossorigin href="/phpCourse/exam/dist/assets/vendor_react-CEGsRJaz.js">
|
||||||
<link rel="modulepreload" crossorigin href="/phpCourse/exam/dist/assets/vendor_mui-lk1_op8u.js">
|
<link rel="modulepreload" crossorigin href="/phpCourse/exam/dist/assets/vendor_tanstack-Be5vPFVC.js">
|
||||||
<link rel="stylesheet" crossorigin href="/phpCourse/exam/dist/assets/vendor_1_react-D83Ey19k.css">
|
<link rel="modulepreload" crossorigin href="/phpCourse/exam/dist/assets/vendor_mui-DGbjTDaU.js">
|
||||||
|
<link rel="stylesheet" crossorigin href="/phpCourse/exam/dist/assets/vendor-D83Ey19k.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Binary file not shown.
@@ -9,19 +9,23 @@ export default defineConfig({
|
|||||||
build: {
|
build: {
|
||||||
outDir: '../dist',
|
outDir: '../dist',
|
||||||
emptyOutDir: true,
|
emptyOutDir: true,
|
||||||
sourcemap: true,
|
// sourcemap: true,
|
||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
output: {
|
output: {
|
||||||
manualChunks: (id) => {
|
manualChunks: (id) => {
|
||||||
|
const segments = id.split('node_modules');
|
||||||
|
const cleanID = segments[segments.length - 1];
|
||||||
|
|
||||||
|
console.log('ID', cleanID);
|
||||||
if (id.includes('node_modules')) {
|
if (id.includes('node_modules')) {
|
||||||
if (id.includes('@mui/') || id.includes('@emotion')) {
|
if (cleanID.includes('@mui/') || cleanID.includes('@emotion')) {
|
||||||
return 'vendor_mui';
|
return 'vendor_mui';
|
||||||
}
|
}
|
||||||
if (id.includes('@tanstack')) {
|
if (cleanID.includes('@tanstack')) {
|
||||||
return 'vendor_tanstack';
|
return 'vendor_tanstack';
|
||||||
}
|
}
|
||||||
if (id.includes('react')) {
|
if (cleanID.includes('react')) {
|
||||||
return 'vendor_1_react';
|
return 'vendor_react';
|
||||||
}
|
}
|
||||||
|
|
||||||
return 'vendor'; // all other package goes here
|
return 'vendor'; // all other package goes here
|
||||||
|
|||||||
Reference in New Issue
Block a user