| | |
| | | 'use strict' |
| | | const path = require('path') |
| | | 'use strict'; |
| | | const path = require('path'); |
| | | |
| | | function resolve (dir) { |
| | | return path.join(__dirname, dir) |
| | | function resolve(dir) { |
| | | return path.join(__dirname, dir); |
| | | } |
| | | |
| | | module.exports = { |
| | |
| | | proxy: { |
| | | '/api': { |
| | | target: 'http://localhost:8000', |
| | | // target: 'http://192.168.3.64:8000', |
| | | changeOrigin: true |
| | | } |
| | | } |
| | |
| | | filename: 'index.html' |
| | | } |
| | | }, |
| | | chainWebpack (config) { |
| | | chainWebpack(config) { |
| | | // set svg-sprite-loader |
| | | config.module |
| | | .rule('svg') |
| | | .exclude.add(resolve('src/icons')) |
| | | .end() |
| | | .end(); |
| | | config.module |
| | | .rule('icons') |
| | | .test(/\.svg$/) |
| | |
| | | .options({ |
| | | symbolId: 'icon-[name]' |
| | | }) |
| | | .end() |
| | | .end(); |
| | | } |
| | | } |
| | | }; |