Skip to content
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

production 模式 js 的tree shaking 没起作用 #233

Open
xukaijie111 opened this issue Dec 10, 2024 · 1 comment
Open

production 模式 js 的tree shaking 没起作用 #233

xukaijie111 opened this issue Dec 10, 2024 · 1 comment

Comments

@xukaijie111
Copy link

我用了lodash-es ,按需导入 import {cloneDeep} from "lodash-es"
最后的产物分析里,把lodash-es所有文件都打入了。
需要如何配置呢?让js tree shaking生效

@aboyforwind
Copy link
Collaborator

import debounce from 'lodash-es/debounce' 只导入使用到的模块

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants