vue.config.js 650 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. 'use strict'
  2. // 引入等比适配插件
  3. const px2rem = require('postcss-px2rem')
  4. // 配置基本大小
  5. const postcss = px2rem({
  6. // 基准大小 baseSize,需要和flexible.js中相同
  7. remUnit: 80
  8. })
  9. module.exports = {
  10. publicPath: "/",
  11. outputDir: 'dist',
  12. assetsDir: 'static',
  13. lintOnSave: false, // 关闭语法检查 防止不必要的语法报错
  14. productionSourceMap: false,
  15. devServer: {
  16. host: 'localhost',
  17. port: 8080,
  18. open: true,
  19. overlay: {
  20. warning: false,
  21. error: true,
  22. },
  23. },
  24. css: {
  25. loaderOptions: {
  26. postcss: {
  27. plugins: [
  28. postcss
  29. ]
  30. }
  31. }
  32. }
  33. }