feat: pages-sub README.md
This commit is contained in:
parent
43e51d95de
commit
3ba37d9b05
19
src/pages-sub/README.md
Normal file
19
src/pages-sub/README.md
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# 分包配置
|
||||||
|
|
||||||
|
在 `vite.config.ts` 中进行配置。
|
||||||
|
|
||||||
|
```ts
|
||||||
|
import { defineConfig } from 'vite'
|
||||||
|
import UniPages from '@uni-helper/vite-plugin-uni-pages'
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
plugins: [
|
||||||
|
UniPages({
|
||||||
|
// ... 其他配置
|
||||||
|
subPackages: [
|
||||||
|
'src/pages-sub', // 是个数组,可以配置多个
|
||||||
|
],
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
})
|
||||||
|
```
|
@ -52,7 +52,7 @@ export default ({ command, mode }) => {
|
|||||||
exclude: ['**/components/**/**.*'],
|
exclude: ['**/components/**/**.*'],
|
||||||
routeBlockLang: 'json5', // 虽然设了默认值,但是vue文件还是要加上 lang="json5", 这样才能很好地格式化
|
routeBlockLang: 'json5', // 虽然设了默认值,但是vue文件还是要加上 lang="json5", 这样才能很好地格式化
|
||||||
homePage: 'pages/index/index',
|
homePage: 'pages/index/index',
|
||||||
subPackages: ['src/pages-sub'], // 这是个数组,可以写多个
|
subPackages: ['src/pages-sub'], // 是个数组,可以配置多个
|
||||||
}),
|
}),
|
||||||
UniLayouts(),
|
UniLayouts(),
|
||||||
UniPlatform(),
|
UniPlatform(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user