react路由自动生成
install
npm install createrouterplugin --save-dev
use
new RouterPlugin({
filePath: '**/index.js',
basepath: path.resolve(SRC_PATH, 'pages'),
output: path.resolve(SRC_PATH, 'routerConfig.js')
})
npm install createrouterplugin --save-dev
new RouterPlugin({
filePath: '**/index.js',
basepath: path.resolve(SRC_PATH, 'pages'),
output: path.resolve(SRC_PATH, 'routerConfig.js')
})
npm i createrouterplugin
2
1.0.0
ISC
2.67 kB
3