vue.config.js 966 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. lintOnSave: false,
  15. chainWebpack: (config) => {
  16. config.plugin("provide").use(webpack.ProvidePlugin, [
  17. {
  18. $: "jquery",
  19. jquery: "jquery",
  20. jQuery: "jquery",
  21. "window.jQuery": "jquery",
  22. },
  23. ]);
  24. },
  25. });
  26. module.exports = {
  27. pwa: {
  28. iconPaths: {
  29. favicon32: 'favicon.ico',
  30. favicon16: 'favicon.ico',
  31. appleTouchIcon: 'favicon.ico',
  32. maskIcon: 'favicon.ico',
  33. msTileImage: 'favicon.ico'
  34. }
  35. }
  36. };