22 lines
465 B
JavaScript
22 lines
465 B
JavaScript
const TransformPages = require('uni-read-pages')
|
|
|
|
const {
|
|
webpack
|
|
} = new TransformPages()
|
|
|
|
module.exports = {
|
|
configureWebpack: {
|
|
plugins: [
|
|
new webpack.DefinePlugin({
|
|
ROUTES: webpack.DefinePlugin.runtimeValue(() => {
|
|
const tfPages = new TransformPages({
|
|
includes: ['path', 'name', 'aliasPath', 'auth']
|
|
});
|
|
return JSON.stringify(tfPages.routes)
|
|
}, true)
|
|
})
|
|
]
|
|
},
|
|
lintOnSave:false // 关闭语法检查
|
|
}
|