vue.config.js 995 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. const { defineConfig } = require("@vue/cli-service");
  2. // 引入等比适配插件
  3. const px2rem = require("postcss-px2rem");
  4. const webpack = require("webpack");
  5. // 配置基本大小
  6. const postcss = px2rem({
  7. // 基准大小 baseSize,需要和rem.js中相同
  8. // remUnit: 14 代表 1rem = 14px; 所以当你一个14px值时,它会自动转成 (14px/14)rem
  9. remUnit: 20,
  10. });
  11. module.exports = defineConfig({
  12. transpileDependencies: true,
  13. publicPath: "./",
  14. outputDir: "jiazheng-user",
  15. lintOnSave: false,
  16. chainWebpack: (config) => {
  17. config.plugin("provide").use(webpack.ProvidePlugin, [
  18. {
  19. $: "jquery",
  20. jquery: "jquery",
  21. jQuery: "jquery",
  22. "window.jQuery": "jquery",
  23. },
  24. ]);
  25. },
  26. });
  27. module.exports = {
  28. pwa: {
  29. iconPaths: {
  30. favicon32: 'favicon.ico',
  31. favicon16: 'favicon.ico',
  32. appleTouchIcon: 'favicon.ico',
  33. maskIcon: 'favicon.ico',
  34. msTileImage: 'favicon.ico'
  35. }
  36. }
  37. };