¶Ô±ÈÐÂÎļþ |
| | |
| | | module.exports = { |
| | | //è·¯å¾åç¼ |
| | | publicPath: "/", |
| | | lintOnSave: true, |
| | | productionSourceMap: false, |
| | | chainWebpack: (config) => { |
| | | //忽ç¥çæå
æä»¶ |
| | | config.externals({ |
| | | 'vue': 'Vue', |
| | | 'vue-router': 'VueRouter', |
| | | 'vuex': 'Vuex', |
| | | 'axios': 'axios', |
| | | 'element-ui': 'ELEMENT', |
| | | }); |
| | | const entry = config.entry('app'); |
| | | entry.add('babel-polyfill').end(); |
| | | entry.add('classlist-polyfill').end(); |
| | | entry.add('@/mock').end(); |
| | | }, |
| | | css: { |
| | | extract: { ignoreOrder: true } |
| | | }, |
| | | //å¼å模å¼åå代çé
ç½®ï¼ç产模å¼è¯·ä½¿ç¨Nginxé¨ç½²å¹¶é
ç½®åå代ç |
| | | devServer: { |
| | | port: 38000, |
| | | proxy: { |
| | | '/api': { |
| | | //æ¬å°æå¡æ¥å£å°å |
| | | target: 'http://192.168.0.106:37000', |
| | | // target: 'http://dev.vci-tech.com:37000', |
| | | //è¿ç¨æ¼ç¤ºæå¡å°å,å¯ç¨äºç´æ¥å¯å¨é¡¹ç® |
| | | //target: 'https://saber.bladex.vip/api', |
| | | ws: true, |
| | | pathRewrite: { |
| | | '^/api': '/' |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }; |