GSExamProj/vue.config.js

31 lines
729 B
JavaScript

//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 )
})
]
},
devServer: {
disableHostCheck: true,
proxy: {
'/public': {
target: 'http://192.168.0.36:8081/GsExamWeb',
changeOrigin: true,
secure: false,
ws: false,
pathRewrite: {
'^/public': ''
}
}
}
}
}