0.0.5 • Published 1 year ago
@bzlab/bz-vite-mpa v0.0.5
bz-vite-mpa
vite多页应用插件
快速上手
npm i @bzlab/bz-vite-mpa -D
// vite.config.ts
import mpa from '@bzlab/bz-vite-mpa'
export default defineConfig({
plugins: [
// ...other plugins
mpa(/* options */),
]
})
文档
props 配置项
序号 | 参数 | 说明 | 默认值 |
---|---|---|---|
1 | open | 是否打开浏览器 | false |
2 | openFirstPage | 首次打开页面 | / |
3 | scanPub | 扫描入口文件目录 | public |
4 | scanDir | 扫描文件目录 | src/views |
5 | scanFile | 扫描文件格式 | main.{js,ts,jsx,tsx} |
6 | filename | 默认入口文件名 | index.html |
7 | defaultEntries | 默认入口文件路径 | - |
8 | defaultPage | 默认页面 | center |
9 | rewrites | 重写规则 | [] |
发布包
npm publish --registry https://registry.npmjs.org --access public
卸载包
npm unpublish @bzlab/bz-vite-mpa --force --registry https://registry.npmjs.org