| | |
| | | const path = require('path') |
| | | const defaultSettings = require('./src/settings.js') |
| | | const webpack = require('webpack') |
| | | |
| | | function resolve(dir) { |
| | | return path.join(__dirname, dir) |
| | | } |
| | |
| | | // } |
| | | // } |
| | | // }, |
| | | transpileDependencies: ['screenfull'], |
| | | productionSourceMap: false, |
| | | devServer: { |
| | | port: port, |
| | |
| | | proxy: { |
| | | [process.env.VUE_APP_BASE_API]: { |
| | | target: 'http://121.196.36.24:8001', // 请求的第三⽅接⼝地址 本地开发服务器 |
| | | // target: 'http://192.168.2.138:8001', // 请求的第三⽅接⼝地址 客户服务器(大岛) |
| | | // target: 'http://192.168.5.176:8001', // 请求的第三⽅接⼝地址 客户服务器(索普) |
| | | changeOrigin: true, // 请求跨域时,需 配置此项 |
| | | pathRewrite: { // 路径重写,替换target中的请求地址 |
| | | ['^' + process.env.VUE_APP_BASE_API]: '/api/' |
| | |
| | | $: 'jquery' |
| | | }) |
| | | ] |
| | | // module: { |
| | | // rules: [ |
| | | // { |
| | | // test: /.vue$/, |
| | | // loader: 'vue-loader' |
| | | // } |
| | | // ] |
| | | // } |
| | | }, |
| | | chainWebpack(config) { |
| | | // it can improve the speed of the first screen, it is recommended to turn on preload |
| | |
| | | .plugin('ScriptExtHtmlWebpackPlugin') |
| | | .after('html') |
| | | .use('script-ext-html-webpack-plugin', [{ |
| | | // `runtime` must same as runtimeChunk name. default is `runtime` |
| | | // `runtime` must same as runtimeChunk name. default is `runtime` |
| | | inline: /runtime\..*\.js$/ |
| | | }]) |
| | | .end() |