You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

39 line
811 B

  1. /*
  2. * @Author: zhp
  3. * @Date: 2023-01-06 10:13:07
  4. * @LastEditTime: 2023-05-31 10:43:18
  5. * @LastEditors: zhp
  6. * @Description:
  7. */
  8. /**
  9. * 配置参考: https://cli.vuejs.org/zh/config/
  10. */
  11. const path = require('path')
  12. function resolve(dir) {
  13. return path.join(__dirname, dir)
  14. }
  15. module.exports = {
  16. publicPath: process.env.NODE_ENV === 'production' ? './' : '/',
  17. chainWebpack: (config) => {
  18. config.module.rule('svg').exclude.add(resolve('src/icons')).end()
  19. config.module
  20. .rule('icons')
  21. .test(/\.svg$/)
  22. .include.add(resolve('src/icons'))
  23. .end()
  24. .use('svg-sprite-loader')
  25. .loader('svg-sprite-loader')
  26. },
  27. productionSourceMap: false,
  28. devServer: {
  29. open: true,
  30. port: 8001,
  31. hot: true,
  32. overlay: {
  33. errors: true,
  34. warnings: true
  35. }
  36. }
  37. }