From 1736c71831c96b32c13d42816fd2b529f004beb6 Mon Sep 17 00:00:00 2001 From: sovanchen Date: Sat, 8 Aug 2026 10:35:23 +0800 Subject: [PATCH] fix: resolve dev server startup failures (route name conflict + eslint abort) Two bugs block 'yarn dev' on a fresh clone: 1) Vue Router name conflict (white screen) src/router/modules/{editor,home,template}.ts declared a child route with the same 'name' as its parent, which Vue Router 4 forbids. Renamed child routes to 'Index' (e.g. editor -> editorIndex), matching the convention already used by the syntax/update modules. 2) eslint aborts the dev server on first run vite-plugin-eslint runs with lintOnStart: true, but the auto-generated declaration files auto-imports.d.ts / components.d.ts were not ignored by eslint, so the prettier formatting error inside the generated file aborted vite's buildStart and killed the server. Added them (and .eslintrc.cjs) to .eslintignore and .prettierignore. --- .eslintignore | 3 +++ .prettierignore | 3 ++- src/router/modules/editor.ts | 2 +- src/router/modules/home.ts | 2 +- src/router/modules/template.ts | 2 +- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.eslintignore b/.eslintignore index 0db090d3..d59bfdb1 100644 --- a/.eslintignore +++ b/.eslintignore @@ -7,3 +7,6 @@ service **/*.scss **/*.css index.html +auto-imports.d.ts +.eslintrc.cjs +components.d.ts diff --git a/.prettierignore b/.prettierignore index f7d29413..800352c9 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,4 +1,5 @@ dist node_modules docs -service \ No newline at end of file +service +auto-imports.d.ts \ No newline at end of file diff --git a/src/router/modules/editor.ts b/src/router/modules/editor.ts index ee0d542d..8df009f3 100644 --- a/src/router/modules/editor.ts +++ b/src/router/modules/editor.ts @@ -7,7 +7,7 @@ export default { children: [ { path: '/editor', - name: 'editor', + name: 'editorIndex', component: () => import('@/views/editor/editor.vue') } ] diff --git a/src/router/modules/home.ts b/src/router/modules/home.ts index 68d3fb15..8f064844 100644 --- a/src/router/modules/home.ts +++ b/src/router/modules/home.ts @@ -7,7 +7,7 @@ export default { children: [ { path: '/home', - name: 'home', + name: 'homeIndex', component: () => import('@/views/home/home.vue') } ] diff --git a/src/router/modules/template.ts b/src/router/modules/template.ts index 82ab1d45..b811eea5 100644 --- a/src/router/modules/template.ts +++ b/src/router/modules/template.ts @@ -7,7 +7,7 @@ export default { children: [ { path: '/template', - name: 'template', + name: 'templateIndex', component: () => import('@/views/template/template.vue') } ]