SharedLibraryWebpackPlugin
beta
beta
  • SharedLibraryWebpackPlugin
  • Documentation
    • Installation and Configuration
    • How does it work?
    • Sharing and Tree shaking
    • The Plugin
  • Contributor Covenant Code of Conduct
  • Contributing
  • License
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. Documentation

Sharing and Tree shaking

PreviousHow does it work?NextThe Plugin

Last updated 4 years ago

Was this helpful?

Tree shaking is dead-code elimination.

Because the plugin doesn't know which the library part will use in another application, it disabled tree shaking. Therefore bundles become large.

For the solution, the plugin provides an usedExports option. It can be an array of import names to be used by another application. See the example in .

Read more
the demo