boolean
true
only support webpack
Specifies whether to modularize the import of lodash and remove unused lodash modules to reduce the code size of lodash.
This optimization is implemented using babel-plugin-lodash and swc-plugin-lodash under the hood.
This option is enabled by default, and Modern.js will automatically redirects the code references of lodash
to sub-paths.
For example:
The transformed code will be:
In some cases, the import transformation of lodash
may generate unexpected code. In such cases, you can manually disable this optimization: