Skip to content

Commit 72f085d

Browse files
committed
fix: trailing slash is not required in Vite 2
See https://vitejs.dev/guide/migration.html#alias-behavior-change Fixes vuejs#12
1 parent d29e6d6 commit 72f085d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

template/base/vite.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default defineConfig({
88
plugins: [vue()],
99
resolve: {
1010
alias: {
11-
'@/': fileURLToPath(new URL('./src/', import.meta.url))
11+
'@': fileURLToPath(new URL('./src', import.meta.url))
1212
}
1313
}
1414
})

template/config/jsx/vite.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default defineConfig({
99
plugins: [vue(), vueJsx()],
1010
resolve: {
1111
alias: {
12-
'@/': fileURLToPath(new URL('./src/', import.meta.url))
12+
'@': fileURLToPath(new URL('./src', import.meta.url))
1313
}
1414
}
1515
})

0 commit comments

Comments
 (0)