Skip to content

Treeshake dynamic imports based on destructuring #16872

@TheLarkInn

Description

@TheLarkInn

Given the following code:

import('lodash-es').then(({uniq}) => uniq)

When webpack bundles this code, it should only include the module tree for uniq and tree-shake the rest of the exports in lodash-es as unused.

Metadata

Metadata

Type

No type

Projects

Status

Priority - High

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions