0.0.30 • Published 2 years ago

@upp-plugin/across-client-uni v0.0.30

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

@upp-plugin/auto-router

TODO: description

安装

npm i -S @upp-plugin/auto-router

Usage

const autoRouterWebpackPlugin = require('@upp-plugin/auto-router')

configureWebpack: {
    plugins: [
      new autoRouterWebpackPlugin({
        moduleName: 'admin-new',  // 模块名称
        entry: path.resolve(process.cwd(), 'src/modules/admin-new'),  // 路由入口Dir
        ignore: [],   // 禁止生成路由的文件
      })
    ]
}

// TODO: DEMONSTRATE API

update

2022-02-15 更新

可动态设置路由页面识别路径,动态设置生成路由文件位置 1. 设置了默认生成路由地址 2. 区分了生成文件 outputDir 和 outputFileName (修复了固定输出文件地址) 3. 将 ignore 做了内部默认设置 4. 增加清空文件路由配置属性 cleanDir:true