vue.config.js 613 B

12345678910111213141516171819202122232425
  1. /**
  2. * 配置参考: https://cli.vuejs.org/zh/config/
  3. */
  4. module.exports = {
  5. publicPath: process.env.NODE_ENV === 'production' ? './' : '/',
  6. chainWebpack: config => {
  7. const svgRule = config.module.rule('svg')
  8. svgRule.uses.clear()
  9. svgRule
  10. .test(/\.svg$/)
  11. .use('svg-sprite-loader')
  12. .loader('svg-sprite-loader')
  13. },
  14. // 默认打开eslint效验,如果需要关闭,设置成false即可
  15. lintOnSave: false,
  16. productionSourceMap: false,
  17. devServer: {
  18. open: true,
  19. port: 8001,
  20. overlay: {
  21. errors: true,
  22. warnings: true
  23. }
  24. }
  25. }