-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lodash-es推荐 #211
Labels
good issue
good issue
Comments
@zhangziyi123 我会在近期将 lodash 改外 es |
@XiaoDaiGua-Ray help , 有空帮忙搞搞 |
okkk,今天抽空看看。
发自我的iPhone
…------------------ 原始邮件 ------------------
发件人: YongGit ***@***.***>
发送时间: 2024年6月28日 11:50
收件人: InhiblabCore/vue-hooks-plus ***@***.***>
抄送: XiaoDaiGua-Ray ***@***.***>, Mention ***@***.***>
主题: Re: [InhiblabCore/vue-hooks-plus] lodash-es推荐 (Issue #211)
@XiaoDaiGua-Ray help , 有空帮忙搞搞
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
XiaoDaiGua-Ray
added a commit
to XiaoDaiGua-Ray/vue-hooks-plus
that referenced
this issue
Jun 30, 2024
XiaoDaiGua-Ray
added a commit
to XiaoDaiGua-Ray/vue-hooks-plus
that referenced
this issue
Jun 30, 2024
lodash-es 会影响我当前 vitepress 的构建,麻了 @XiaoDaiGua-Ray @zhangziyi123 |
vitepress 内部会 require vhp,lodash-es 不支持 common js |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
The text was updated successfully, but these errors were encountered: