feat(deps): 添加tauri打包(遗留pnpm build:file打包好的文件跨域无法访问) #94
This commit is contained in:
@@ -113,6 +113,10 @@ export const configRoutes = {
|
||||
],
|
||||
}
|
||||
const routes = [
|
||||
{
|
||||
path: '/',
|
||||
redirect: '/log-lottery',
|
||||
},
|
||||
{
|
||||
path: '/log-lottery',
|
||||
component: Layout,
|
||||
@@ -135,7 +139,7 @@ const routes = [
|
||||
const envMode = import.meta.env.MODE
|
||||
const router = createRouter({
|
||||
// 读取环境变量
|
||||
history: envMode === 'file' ? createWebHashHistory() : createWebHistory(),
|
||||
history: (envMode === 'file' || import.meta.env.TAURI_PLATFORM) ? createWebHashHistory() : createWebHistory(),
|
||||
routes,
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user