This commit is contained in:
2024-07-26 03:38:43 +02:00
parent a0b327f744
commit ff0e192768
18 changed files with 201 additions and 211 deletions
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
+125
View File
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
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
+1
View File
@@ -0,0 +1 @@
import"./react-DXd9vB-a.js";
+7 -6
View File
@@ -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>
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -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",
+1 -8
View File
@@ -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 -18
View File
@@ -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'],
},
},
},