taro-export-route-type
v1.0.1
Published
根据taro 的 app.config.ts 配置的路由来生成一个路由ts 文件
Downloads
5
Readme
TaroExportRouteType
根据taro 的 app.config.ts 配置的路由来生成一个路由ts 文件
use
import ExportRouteType from 'taro-export-route-type'
webpackChain(chain) {
chain.plugin('route').use(ExportRouteType)
}
参数
webpackChain(chain) {
chain.plugin('route').use(
ExportRouteType,
[{ entry: './src/app.config.ts', output: './types/route.d.ts', typeName: 'export type RouteType' }]
)
}
- entry:入口文件
- output: 输出的文件路径
- typeName: 文件里面的导出名字