绍兴公厕前端
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.

42 lines
1.3 KiB

3 years ago
  1. // const { px2remRatio } = require('./src/common/js/set-html-fSize')
  2. // const ProgressBarPlugin = require('progress-bar-webpack-plugin')
  3. module.exports = {
  4. publicPath: './',
  5. productionSourceMap: false,
  6. css: {
  7. loaderOptions: {
  8. postcss: {
  9. plugins: [
  10. // require('postcss-pxtorem')({
  11. // rootValue: px2remRatio, // px 转换成 rem 的比率(如:1rem = 100px,则比率为 100)
  12. // unitPrecision: 5, // 转换成 rem 单位后保留几位小数
  13. // propList: ['*'], // 指定可以将 px 转换为 rem 的属性
  14. // selectorBlackList: [/^html|body$/], // 要忽略的选择器保留为 px
  15. // replace: true,
  16. // mediaQuery: false, // 允许在媒体查询中转换 px
  17. // minPixelValue: 12, // px 小于该值的不会被转换
  18. // exclude: /node_modules/i // 要忽略并保留为 px 的文件路径
  19. // })
  20. ]
  21. },
  22. sass: {
  23. prependData: `@import "~@/common/sass/global.scss";`
  24. }
  25. }
  26. },
  27. configureWebpack: {
  28. externals: {
  29. vue: 'Vue',
  30. moment: 'moment',
  31. echarts: 'echarts',
  32. 'element-ui': 'ELEMENT',
  33. jQuery: 'jQuery',
  34. Hls: 'Hls'
  35. }
  36. // plugins: [new ProgressBarPlugin()]
  37. },
  38. chainWebpack: config => {
  39. config.plugins.delete('prefetch')
  40. }
  41. }