taro-export-route-type
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

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: 文件里面的导出名字

Dependencies (0)

    Dev Dependencies (2)

    Package Sidebar

    Install

    npm i taro-export-route-type

    Weekly Downloads

    0

    Version

    1.0.1

    License

    ISC

    Unpacked Size

    18.7 kB

    Total Files

    6

    Last publish

    Collaborators

    • ajinbird