File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 11import { fileURLToPath , URL } from 'url'
22import { defineConfig } from 'vite'
3- import { join } from 'node:path'
43import Markdown from 'unplugin-vue-markdown/vite'
54// @ts -ignore: the plugin should not be checked in the playground
65import VueRouter from '../src/vite'
@@ -9,8 +8,6 @@ import Vue from '@vitejs/plugin-vue'
98import AutoImport from 'unplugin-auto-import/vite'
109import VueDevtools from 'vite-plugin-vue-devtools'
1110
12- const __dirname = fileURLToPath ( new URL ( '.' , import . meta. url ) )
13-
1411export default defineConfig ( {
1512 clearScreen : false ,
1613 resolve : {
@@ -102,7 +99,10 @@ export default defineConfig({
10299 }
103100 } ,
104101 beforeWriteFiles ( root ) {
105- root . insert ( '/from-root' , join ( __dirname , './src/pages/index.vue' ) )
102+ root . insert (
103+ '/from-root' ,
104+ fileURLToPath ( new URL ( './src/pages/index.vue' , import . meta. url ) )
105+ )
106106 } ,
107107 routesFolder : [
108108 // can add multiple routes folders
You can’t perform that action at this time.
0 commit comments