123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- const url = 'http://localhost:9999'
- module.exports = {
- lintOnSave: true,
- productionSourceMap: false,
- chainWebpack: (config) => {
- config.externals({
- 'vue': 'Vue',
- 'vue-router': 'VueRouter',
- 'vuex': 'Vuex',
- 'axios': 'axios',
- 'element-ui': 'ELEMENT',
- })
- },
- transpileDependencies: ['avue-plugin-transfer', 'avue-plugin-ueditor'],
- //配置转发代理
- devServer: {
- proxy: {
- '/auth': {
- target: url,
- ws: true,
- pathRewrite: {
- '^/auth': '/auth'
- }
- },
- '/admin': {
- target: url,
- ws: true,
- pathRewrite: {
- '^/admin': '/admin'
- }
- },
- '/code': {
- target: url,
- ws: true,
- pathRewrite: {
- '^/code': '/code'
- }
- },
- '/gen': {
- target: url,
- ws: true,
- pathRewrite: {
- '^/gen': '/gen'
- }
- },
- '/daemon': {
- target: url,
- ws: true,
- pathRewrite: {
- '^/daemon': '/daemon'
- }
- },
- '/tx': {
- target: url,
- ws: true,
- pathRewrite: {
- '^/tx': '/tx'
- }
- },
- '/act': {
- target: url,
- ws: true,
- pathRewrite: {
- '^/act': '/act'
- }
- },
- }
- }
- }
|