Closed wuyax closed 3 years ago
打包以后通过webpack-bundle-analyzer分析发现lodash被完整的打包进了vendors.js。 import { defaultsDeep, omit, pick, cloneDeep } from "lodash-es"; 替换为 import defaultsDeep from "lodash-es/defaultsDeep"; 可能是个更好的方案。
import { defaultsDeep, omit, pick, cloneDeep } from "lodash-es";
import defaultsDeep from "lodash-es/defaultsDeep";
蟹蟹啦,已更新
打包以后通过webpack-bundle-analyzer分析发现lodash被完整的打包进了vendors.js。
import { defaultsDeep, omit, pick, cloneDeep } from "lodash-es";
替换为import defaultsDeep from "lodash-es/defaultsDeep";
可能是个更好的方案。