build(前端): 配置部署子路径并修复html末尾换行
配置vite的base为/app_03/、路由的basename为/app_03,同时修复index.html缺少末尾换行的问题
This commit is contained in:
@@ -125,4 +125,4 @@ export const router = createBrowserRouter([
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
]);
|
], { basename: "/app_03" });
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import react from '@vitejs/plugin-react'
|
|||||||
import basicSsl from '@vitejs/plugin-basic-ssl'
|
import basicSsl from '@vitejs/plugin-basic-ssl'
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
|
base: '/app_03/',
|
||||||
plugins: [
|
plugins: [
|
||||||
// The React and Tailwind plugins are both required for Make, even if
|
// The React and Tailwind plugins are both required for Make, even if
|
||||||
// Tailwind is not being actively used – do not remove them
|
// Tailwind is not being actively used – do not remove them
|
||||||
|
|||||||
Reference in New Issue
Block a user