-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Closed
Description
Bug report
What is the current behavior?
When using ProvidePlugin to provide join of lodash or lodash-es, the output bundle can't drop the rest of lodash as docs said: https://v4.webpack.js.org/guides/shimming/#shimming-globals
If the current behavior is a bug, please provide the steps to reproduce.
Follow the Getting Started & Shimming steps from docs.
- git clone git@github.com:Chen-jj/webpack-demo.git
- yarn && npm run build
- When using ProvidePlugin, the bundle size is about 99.4k.
While usingimport { join } from 'lodash-es'instead the size is about 1.13k.
What is the expected behavior?
The output bundles contain lodash.join.
Other relevant information:
webpack version: 4.44.2
Node.js version: 12.14
Operating System: MacOS
Additional tools:
Metadata
Metadata
Assignees
Labels
No labels
