Skip to content

Commit edf8d10

Browse files
authored
fix: vue-router when using base preset (#47)
1 parent 2e68f33 commit edf8d10

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

template/javascript/base/src/router/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import { createRouter, createWebHistory } from 'vue-router/auto'
1010

1111
const router = createRouter({
12-
history: createWebHistory(process.env.BASE_URL),
12+
history: createWebHistory(import.meta.env.BASE_URL),
1313
})
1414

1515
export default router

template/javascript/essentials/src/router/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { createRouter, createWebHistory } from 'vue-router/auto'
99
import { setupLayouts } from 'virtual:generated-layouts'
1010

1111
const router = createRouter({
12-
history: createWebHistory(process.env.BASE_URL),
12+
history: createWebHistory(import.meta.env.BASE_URL),
1313
extendRoutes: setupLayouts,
1414
})
1515

template/typescript/base/src/router/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import { createRouter, createWebHistory } from 'vue-router/auto'
99

1010
const router = createRouter({
11-
history: createWebHistory(process.env.BASE_URL),
11+
history: createWebHistory(import.meta.env.BASE_URL),
1212
})
1313

1414
export default router

template/typescript/essentials/src/router/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { createRouter, createWebHistory } from 'vue-router/auto'
99
import { setupLayouts } from 'virtual:generated-layouts'
1010

1111
const router = createRouter({
12-
history: createWebHistory(process.env.BASE_URL),
12+
history: createWebHistory(import.meta.env.BASE_URL),
1313
extendRoutes: setupLayouts,
1414
})
1515

0 commit comments

Comments
 (0)