boenfu / vuex-along

:memo: auto save and restore state for vuex
https://boenfu.github.io/vuex-along/
MIT License
259 stars 36 forks source link

打包的时候lodash不能被Tree shaking #44

Closed wuyax closed 3 years ago

wuyax commented 3 years ago

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

boenfu commented 3 years ago

蟹蟹啦,已更新