const TransformPages = require('./js_sdk/uni-read-pages') const {webpack} = new TransformPages() module.exports = { devServer:{ proxy: 'http://localhost:8080', public: '192.168.2.60:8080' // 本地ip }, configureWebpack: { plugins: [ new webpack.DefinePlugin({ ROUTES: webpack.DefinePlugin.runtimeValue(() => { const tfPages = new TransformPages({ includes: ['path', 'name', 'aliasPath','animation', 'meta'] }); return JSON.stringify(tfPages.routes) }, true ) }) ] } }