add 404
This commit is contained in:
14
package-lock.json
generated
14
package-lock.json
generated
@@ -23,7 +23,8 @@
|
||||
"react-markdown": "^9.0.3",
|
||||
"tailwind-merge": "^2.6.0",
|
||||
"tailwind-scrollbar-hide": "^2.0.0",
|
||||
"tailwindcss-animate": "^1.0.7"
|
||||
"tailwindcss-animate": "^1.0.7",
|
||||
"vite-plugin-copy": "^0.1.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@shadcn/ui": "^0.0.4",
|
||||
@@ -5419,6 +5420,17 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/vite-plugin-copy": {
|
||||
"version": "0.1.6",
|
||||
"resolved": "https://registry.npmmirror.com/vite-plugin-copy/-/vite-plugin-copy-0.1.6.tgz",
|
||||
"integrity": "sha512-bqIaefZOE2Jx8P5wJuHKL5GzCERa/pcwdUQWaocyTNXgalN2xkxXH7LmqRJ34V2OlKF2F9E/zj0zITS7U6PpUg==",
|
||||
"dependencies": {
|
||||
"fast-glob": "^3.2.7"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/wcwidth": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz",
|
||||
|
||||
@@ -23,7 +23,8 @@
|
||||
"react-markdown": "^9.0.3",
|
||||
"tailwind-merge": "^2.6.0",
|
||||
"tailwind-scrollbar-hide": "^2.0.0",
|
||||
"tailwindcss-animate": "^1.0.7"
|
||||
"tailwindcss-animate": "^1.0.7",
|
||||
"vite-plugin-copy": "^0.1.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@shadcn/ui": "^0.0.4",
|
||||
|
||||
@@ -1,9 +1,20 @@
|
||||
import { defineConfig } from 'vite'
|
||||
import react from '@vitejs/plugin-react'
|
||||
import path from 'path'
|
||||
import copy from 'vite-plugin-copy'
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
plugins: [
|
||||
react(),
|
||||
copy({
|
||||
patterns: [
|
||||
{
|
||||
from: 'assets', // 源目录
|
||||
to: 'dist/assets' // 目标目录
|
||||
}
|
||||
]
|
||||
})
|
||||
],
|
||||
base: '/',
|
||||
server: {
|
||||
port: 3000,
|
||||
@@ -33,10 +44,9 @@ export default defineConfig({
|
||||
main: path.resolve(__dirname, 'index.html'),
|
||||
},
|
||||
output: {
|
||||
assetFileNames: (assetInfo) => {
|
||||
// 将资源文件输出到 dist/assets 目录
|
||||
return `assets/[name].[hash][extname]`
|
||||
}
|
||||
assetFileNames: 'assets/[name].[hash][extname]',
|
||||
chunkFileNames: 'assets/[name].[hash].js',
|
||||
entryFileNames: 'assets/[name].[hash].js'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user