diff --git a/pages.config.ts b/pages.config.ts index c19af24..f73172d 100644 --- a/pages.config.ts +++ b/pages.config.ts @@ -40,12 +40,6 @@ export default defineUniPages({ }, // 你也可以定义 pages 字段,它具有最高的优先级。 pages: [], - /** - * exclude page - * 排除的页面,相对于 dir 和 subPackages,通常把这些目录里面的components里面的文件排除掉 - * @default [] - */ - exclude: ['**/components/**/**.*'], /** * subPackages 扫描的目录,例如:src/pages-sub * @type SubPackage[] | undefined diff --git a/src/pages.json b/src/pages.json index 69bc08b..b12c80d 100644 --- a/src/pages.json +++ b/src/pages.json @@ -64,12 +64,7 @@ "backgroundColor": "#23c09c", "navigationStyle": "custom" } - }, - { - "path": "pages/index/components/demo", - "type": "page" } ], - "exclude": ["**/components/**/**.*"], "subPackages": [] } diff --git a/uni-pages.d.ts b/uni-pages.d.ts index 79b9205..6cfba54 100644 --- a/uni-pages.d.ts +++ b/uni-pages.d.ts @@ -7,8 +7,7 @@ interface NavigateToOptions { url: "pages/index/index" | "pages/demo/index" | "pages/my/index" | - "pages/throughout/index" | - "pages/index/components/demo"; + "pages/throughout/index"; } interface RedirectToOptions extends NavigateToOptions {} diff --git a/vite.config.ts b/vite.config.ts index 7887315..834291f 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -45,7 +45,7 @@ export default ({ command, mode }) => { return defineConfig({ plugins: [ // UniPages() 需要在 Uni() 之前引入 - UniPages(), + UniPages({ exclude: ['**/components/**/**.*'] }), Uni(), UnoCSS(), process.env.UNI_PLATFORM === 'h5' && htmlPlugin(env.VITE_APP_TITLE),