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

build: tree shaking lodash #851

Merged
merged 1 commit into from
Nov 29, 2024
Merged

build: tree shaking lodash #851

merged 1 commit into from
Nov 29, 2024

Conversation

hbztd
Copy link
Contributor

@hbztd hbztd commented Nov 29, 2024

import { debounce, throttle, get as mGet } from "lodash";
import * as _ from "lodash";
import util from "lodash";
console.log(mGet(), util.set(), _.map())

转换为

import debounce from "lodash/debounce";
import throttle from "lodash/throttle";
import mGet from "lodash/get";
import _map from "lodash/map";
import utilset from "lodash/set";
console.log(mGet(), utilset(), _map())

已知以下为处理(代码里不存在)
1.lodash/fp
2.import "lodash"
3.import { get as _get } from "lodash"; import _ as from "lodash"; console.log(_get(), _.get())

@Pilotager Pilotager merged commit 3931087 into mallfoundry:main Nov 29, 2024
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

Successfully merging this pull request may close these issues.

2 participants