suerprisePlus
2024-06-05 5bbdc2dd07a05c9953df1a9125dd9cb894212c08
vue.config.js
@@ -1,31 +1,39 @@
const path = require("path")
const resolve = dir => path.join(__dirname, dir)
const path = require("path");
const resolve = (dir) => path.join(__dirname, dir);
module.exports = {
    lintOnSave: false,
    publicPath: "./",
    devServer: {
        host: "0.0.0.0", //指定要使用的 host
        port: 12315, //指定端口号以侦听
        hotOnly: false, //启用热模块替换,而无需页面刷新作为构建失败时的回退。
  lintOnSave: false,
  publicPath: "./",
  devServer: {
    host: "0.0.0.0", //指定要使用的 host
    port: 12315, //指定端口号以侦听
    hotOnly: false //启用热模块替换,而无需页面刷新作为构建失败时的回退。
  },
  configureWebpack: {
    module: {
      rules: [
        {
          test: /\.scss$/,
          loaders: ["style", "css", "sass"]
        }
      ]
    },
    configureWebpack: {
        resolve: {
            alias: {
                "@": resolve("src"),
            },
        }, performance: {
            hints: 'warning',
            // 入口起点的最大体积
            maxEntrypointSize: 90000000,
            // 生成文件的最大体积
            maxAssetSize: 90000000,
            // 只给出 js 文件的性能提示
            assetFilter: function (assetFilename) {
                return assetFilename.endsWith('.js') || assetFilename.endsWith('.css');
            }
        },
    resolve: {
      alias: {
        "@": resolve("src")
      }
    },
}
    performance: {
      hints: "warning",
      // 入口起点的最大体积
      maxEntrypointSize: 90000000,
      // 生成文件的最大体积
      maxAssetSize: 90000000,
      // 只给出 js 文件的性能提示
      assetFilter: function (assetFilename) {
        return assetFilename.endsWith(".js") || assetFilename.endsWith(".css");
      }
    }
  }
};