diff --git a/index.html b/index.html index 05d9e28..a00ad42 100644 --- a/index.html +++ b/index.html @@ -1,4 +1,4 @@ - + @@ -7,6 +7,6 @@
- + diff --git a/package.json b/package.json index b0935a6..fccc2dd 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "type": "module", "scripts": { "dev": "vite", - "build": "tsc -b && vite build", + "build": "tsc && vite build", "lint": "eslint .", "preview": "vite preview" }, diff --git a/vite.config.ts b/vite.config.ts index a1ac7ef..5252793 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -3,5 +3,10 @@ import react from '@vitejs/plugin-react' export default defineConfig({ plugins: [react()], - base: './', // 添加这一行 + base: '/', // 修改这里 + build: { + outDir: 'dist', + assetsDir: 'assets', + sourcemap: false + } })