@syyfe/syy-mp-plugin-parse-router
v3.3.0
Published
商业云小程序路由处理插件
Downloads
3
Readme
商业云小程序路由处理插件
实现了根据路由配置相关模板、套餐,在编译时按需打包
{ name: "home", path: "pages/home/index", meta: { title: "首页", include: ["online", "mix"], exclude: [] } },
通过 include
和 exclude
来控制
安装
npm i @syyfe/syy-mp-plugin-parse-router -D
示例
syy.config.ts
import SyyMpPluginParseRouter from "@syyfe/syy-mp-plugin-parse-router";
const tabBar = require("./src/config/tabbar");
const SyyConfig: ISyyConfig = {
plugin: [
new SyyMpPluginParseRouter({
router: "src/service/router.ts",
getTabbarRouteNames: tabBar.getTabbarRouteNames,
compiledDelPath: ["offline-store/pages", "packageD", "pages", "packageC"]
})
]
};