luohairen
2024-11-07 d0d825e09ffdb95e9c4edcc44eeff08c4b2a9c23
vue.config.js
@@ -1,8 +1,8 @@
'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 = {
@@ -20,6 +20,7 @@
    proxy: {
      '/api': {
        target: 'http://localhost:8000',
        // target: 'http://192.168.3.64:8000',
        changeOrigin: true
      }
    }
@@ -31,12 +32,12 @@
      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$/)
@@ -47,6 +48,6 @@
      .options({
        symbolId: 'icon-[name]'
      })
      .end()
      .end();
  }
}
};