vue.config.js 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. publicPath: "./",
  29. outputDir: "jiazheng-user",
  30. pwa: {
  31. iconPaths: {
  32. favicon32: 'favicon.ico',
  33. favicon16: 'favicon.ico',
  34. appleTouchIcon: 'favicon.ico',
  35. maskIcon: 'favicon.ico',
  36. msTileImage: 'favicon.ico'
  37. }
  38. }
  39. };