vue-hooks-plus
vue-hooks-plus copied to clipboard
lodash-es推荐
Description
Lodash官方提供了ES Module版本的lodash: lodash-es, 给我们导入lodash模块,Tree Shaking就可以生效,其他没用到的代码打包的时候就可以自动移除掉了。
Suggested solution
写法如下: 原来写法:import debounce from "lodash/debounce" 改后:import { debounce } from "lodash-es" 打包大小是差不多,就是写法上的区别,后者更方便一点。
Alternative
No response
Additional context
No response
Validations
- [X] Follow our Code of Conduct
- [X] Read the Contributing Guidelines.
- [X] Read the docs.
- [X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.