fix(pages): exclude 不生效,配置地方错了,要陪在vite.config.ts
This commit is contained in:
parent
a266441305
commit
83e19e8eb2
@ -40,12 +40,6 @@ export default defineUniPages({
|
||||
},
|
||||
// 你也可以定义 pages 字段,它具有最高的优先级。
|
||||
pages: [],
|
||||
/**
|
||||
* exclude page
|
||||
* 排除的页面,相对于 dir 和 subPackages,通常把这些目录里面的components里面的文件排除掉
|
||||
* @default []
|
||||
*/
|
||||
exclude: ['**/components/**/**.*'],
|
||||
/**
|
||||
* subPackages 扫描的目录,例如:src/pages-sub
|
||||
* @type SubPackage[] | undefined
|
||||
|
@ -64,12 +64,7 @@
|
||||
"backgroundColor": "#23c09c",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/index/components/demo",
|
||||
"type": "page"
|
||||
}
|
||||
],
|
||||
"exclude": ["**/components/**/**.*"],
|
||||
"subPackages": []
|
||||
}
|
||||
|
3
uni-pages.d.ts
vendored
3
uni-pages.d.ts
vendored
@ -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 {}
|
||||
|
||||
|
@ -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),
|
||||
|
Loading…
x
Reference in New Issue
Block a user