Chunking
This commit is contained in:
parent
a0b327f744
commit
ff0e192768
2
exam/dist/assets/i18n-DJgSTqOl.js
vendored
Normal file
2
exam/dist/assets/i18n-DJgSTqOl.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
exam/dist/assets/index-DRZup-fm.js
vendored
Normal file
1
exam/dist/assets/index-DRZup-fm.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
exam/dist/assets/index-Db_otgxE.js
vendored
1
exam/dist/assets/index-Db_otgxE.js
vendored
File diff suppressed because one or more lines are too long
1
exam/dist/assets/mui-CKDNpdid.css
vendored
Normal file
1
exam/dist/assets/mui-CKDNpdid.css
vendored
Normal file
File diff suppressed because one or more lines are too long
125
exam/dist/assets/mui-DQviNP-p.js
vendored
Normal file
125
exam/dist/assets/mui-DQviNP-p.js
vendored
Normal file
File diff suppressed because one or more lines are too long
32
exam/dist/assets/react-DXd9vB-a.js
vendored
Normal file
32
exam/dist/assets/react-DXd9vB-a.js
vendored
Normal file
File diff suppressed because one or more lines are too long
17
exam/dist/assets/tanstack-CLt5K1Fy.js
vendored
Normal file
17
exam/dist/assets/tanstack-CLt5K1Fy.js
vendored
Normal file
File diff suppressed because one or more lines are too long
47
exam/dist/assets/vendor_A_react-Bhse1i8S.js
vendored
47
exam/dist/assets/vendor_A_react-Bhse1i8S.js
vendored
File diff suppressed because one or more lines are too long
26
exam/dist/assets/vendor_X-NJT_EpIc.js
vendored
26
exam/dist/assets/vendor_X-NJT_EpIc.js
vendored
File diff suppressed because one or more lines are too long
102
exam/dist/assets/vendor_mui-zY3q7frF.js
vendored
102
exam/dist/assets/vendor_mui-zY3q7frF.js
vendored
File diff suppressed because one or more lines are too long
1
exam/dist/assets/vendor_tanstack-C4tHEw0C.js
vendored
1
exam/dist/assets/vendor_tanstack-C4tHEw0C.js
vendored
File diff suppressed because one or more lines are too long
1
exam/dist/assets/zustand-Cc7ZFYQr.js
vendored
Normal file
1
exam/dist/assets/zustand-Cc7ZFYQr.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
import"./react-DXd9vB-a.js";
|
||||
13
exam/dist/index.html
vendored
13
exam/dist/index.html
vendored
@ -5,12 +5,13 @@
|
||||
<link rel="icon" type="image/svg+xml" href="/phpCourse/exam/dist/vite.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Vite + React + TS</title>
|
||||
<script type="module" crossorigin src="/phpCourse/exam/dist/assets/index-Db_otgxE.js"></script>
|
||||
<link rel="modulepreload" crossorigin href="/phpCourse/exam/dist/assets/vendor_tanstack-C4tHEw0C.js">
|
||||
<link rel="modulepreload" crossorigin href="/phpCourse/exam/dist/assets/vendor_X-NJT_EpIc.js">
|
||||
<link rel="modulepreload" crossorigin href="/phpCourse/exam/dist/assets/vendor_mui-zY3q7frF.js">
|
||||
<link rel="modulepreload" crossorigin href="/phpCourse/exam/dist/assets/vendor_A_react-Bhse1i8S.js">
|
||||
<link rel="stylesheet" crossorigin href="/phpCourse/exam/dist/assets/vendor_X-D83Ey19k.css">
|
||||
<script type="module" crossorigin src="/phpCourse/exam/dist/assets/index-DRZup-fm.js"></script>
|
||||
<link rel="modulepreload" crossorigin href="/phpCourse/exam/dist/assets/react-DXd9vB-a.js">
|
||||
<link rel="modulepreload" crossorigin href="/phpCourse/exam/dist/assets/mui-DQviNP-p.js">
|
||||
<link rel="modulepreload" crossorigin href="/phpCourse/exam/dist/assets/tanstack-CLt5K1Fy.js">
|
||||
<link rel="modulepreload" crossorigin href="/phpCourse/exam/dist/assets/i18n-DJgSTqOl.js">
|
||||
<link rel="stylesheet" crossorigin href="/phpCourse/exam/dist/assets/mui-CKDNpdid.css">
|
||||
<link rel="stylesheet" crossorigin href="/phpCourse/exam/dist/assets/index-D83Ey19k.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
|
||||
2
exam/dist/stats.html
vendored
2
exam/dist/stats.html
vendored
File diff suppressed because one or more lines are too long
@ -18,7 +18,6 @@
|
||||
"@tanstack/react-form": "^0.26.4",
|
||||
"@tanstack/react-query": "^5.51.11",
|
||||
"@tanstack/react-router": "^1.45.8",
|
||||
"@types/node": "^20.14.12",
|
||||
"i18next": "^23.12.2",
|
||||
"i18next-browser-languagedetector": "^8.0.0",
|
||||
"i18next-http-backend": "^2.5.2",
|
||||
@ -33,6 +32,7 @@
|
||||
"@tanstack/react-query-devtools": "^5.51.11",
|
||||
"@tanstack/router-devtools": "^1.45.8",
|
||||
"@tanstack/router-plugin": "^1.45.8",
|
||||
"@types/node": "^20.14.12",
|
||||
"@types/react": "^18.3.3",
|
||||
"@types/react-dom": "^18.3.0",
|
||||
"@typescript-eslint/eslint-plugin": "^7.15.0",
|
||||
|
||||
@ -15,14 +15,7 @@ const Post: FC<Props> = ({ post }) => {
|
||||
<CardHeader
|
||||
avatar={
|
||||
'id' in post.user ? (
|
||||
<MUILink
|
||||
component={Link}
|
||||
to="/profile/$id"
|
||||
params={{ id: post.user.id }}
|
||||
color="#FFF"
|
||||
variant="h6"
|
||||
underline="none"
|
||||
>
|
||||
<MUILink component={Link} to="/profile/$id" params={{ id: post.user.id }} underline="none">
|
||||
<Avatar alt={post.user.username} src={`storage/${post.user.image}`} />
|
||||
</MUILink>
|
||||
) : (
|
||||
|
||||
@ -12,24 +12,18 @@ export default defineConfig({
|
||||
// sourcemap: true,
|
||||
rollupOptions: {
|
||||
output: {
|
||||
manualChunks: (id) => {
|
||||
const segments = id.split('node_modules');
|
||||
const cleanID = segments[segments.length - 1];
|
||||
|
||||
console.log('ID', cleanID);
|
||||
if (id.includes('node_modules')) {
|
||||
if (cleanID.includes('react')) {
|
||||
return 'vendor_A_react';
|
||||
}
|
||||
if (cleanID.includes('@mui/') || cleanID.includes('@emotion')) {
|
||||
return 'vendor_mui';
|
||||
}
|
||||
if (cleanID.includes('@tanstack')) {
|
||||
return 'vendor_tanstack';
|
||||
}
|
||||
|
||||
return 'vendor_X'; // all other package goes here
|
||||
}
|
||||
manualChunks: {
|
||||
react: ['react', 'react-dom'],
|
||||
mui: ['@emotion/react', '@emotion/styled', '@fontsource/roboto', '@mui/icons-material', '@mui/material'],
|
||||
tanstack: [
|
||||
'@tanstack/react-form',
|
||||
'@tanstack/react-query',
|
||||
'@tanstack/react-query',
|
||||
'@tanstack/react-query-devtools',
|
||||
'@tanstack/router-devtools',
|
||||
],
|
||||
i18n: ['i18next', 'i18next-browser-languagedetector', 'i18next-http-backend', 'react-i18next'],
|
||||
zustand: ['zustand'],
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user