module.exports = { publicPath: process.env.NODE_ENV === 'production' ? '/main/' : '/', outputDir: 'dist/main', productionSourceMap: false, devServer: { open: false, // 是否自动弹出浏览器页面 host: '0.0.0.0', port: '8081', https: false, // 是否使用https协议 hotOnly: false, // 是否开启热更新 proxy: { '/service': { target: 'http://192.168.3.105', // API服务器的地址 ws: true, // 代理websockets changeOrigin: true, // 虚拟的站点需要更管origin pathRewrite: { '^/service': '' } } } }, css: { loaderOptions: { stylus: { 'resolve url': true, 'import': [ './src/theme' ] } } }, pluginOptions: { 'cube-ui': { postCompile: true, theme: true } } }