南昌市物联网技防平台-小程序
zengh
2021-06-07 a058c5bad0b34cac2ea88ae222015f231690e62f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//vue.config.js
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']
                    });
                    return JSON.stringify(tfPages.routes)
                }, true )
            })
        ]
    }
}