| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- module.exports = {
- //路径前缀
- publicPath: "/",
- lintOnSave: false, //关闭语法检查
- productionSourceMap: false,
- chainWebpack: (config) => {
- //忽略的打包文件
- config.externals({
- 'vue': 'Vue',
- 'vue-router': 'VueRouter',
- 'vuex': 'Vuex',
- 'axios': 'axios',
- 'element-ui': 'ELEMENT',
- });
- config.module
- .rule('swf')
- .test(/\.swf$/)
- .use('url-loader')
- .loader('url-loader')
- .options({
- limit: 10000
- })
- const entry = config.entry('app');
- entry.add('babel-polyfill').end();
- entry.add('classlist-polyfill').end();
- entry.add('@/mock').end();
- },
- devServer: {
- port: 80,
- proxy: {
- '/api': {
- //本地服务接口地址
- //target: 'http://110.40.223.170:1080', // 新服务器的
- //target: 'http://106.52.134.22:1081', // 1081是一天一次的,打包到test文件夹 1080是一周一次的,打包到ipole文件夹
- //target: 'http://127.0.0.1:1081',
- //target: 'http://10.82.28.33:1080', // 正式服务器的
- //target:'http://113.247.241.253:1080', // 外网 交通局的
- target: process.env.FLOW_DESIGN_URL, // 老的是1080 // 8888
- //远程演示服务地址,可用于直接启动项目
- //target: 'https://saber.bladex.vip/api',
- // changeOrigin:true,
- ws: true,
- pathRewrite: {
- '^/api': process.env.SERVER_VERSION == "go" ? '/api' :"/"
- }
- },
- }
- }
- };
|