Commit 98ed8410 authored by 郝聪敏's avatar 郝聪敏

fix: 去掉lodash插件

parent 8cc9e32f
module.exports = { module.exports = {
presets: ["@vue/cli-plugin-babel/preset"], presets: ["@vue/cli-plugin-babel/preset"]
plugins: ["lodash"]
}; };
...@@ -2,7 +2,6 @@ const path = require("path"); ...@@ -2,7 +2,6 @@ const path = require("path");
const resolve = dir => path.join(__dirname, dir); const resolve = dir => path.join(__dirname, dir);
const SentryPlugin = require("webpack-sentry-plugin"); const SentryPlugin = require("webpack-sentry-plugin");
const CompressionPlugin = require("compression-webpack-plugin"); const CompressionPlugin = require("compression-webpack-plugin");
const lodashWebpackPlugin = require("lodash-webpack-plugin");
const SentryConfig = require("./.sentryclirc"); const SentryConfig = require("./.sentryclirc");
const IS_PROD = process.env.NODE_ENV === "production"; const IS_PROD = process.env.NODE_ENV === "production";
...@@ -21,10 +20,6 @@ module.exports = { ...@@ -21,10 +20,6 @@ module.exports = {
// 移除 preload 插件(针对生产环境首屏请求数进行优化) preload 插件的用途:https://cli.vuejs.org/zh/guide/html-and-static-assets.html#preload // 移除 preload 插件(针对生产环境首屏请求数进行优化) preload 插件的用途:https://cli.vuejs.org/zh/guide/html-and-static-assets.html#preload
config.plugins.delete("preload"); config.plugins.delete("preload");
if (IS_PROD) {
config.plugin("loadshReplace").use(new lodashWebpackPlugin());
}
config.module config.module
.rule("images") .rule("images")
.use("url-loader") .use("url-loader")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment