-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
only add import references when they are used (#8874)
### Description skips import to modules that are side effect free and have no exports referenced This allows to e. g. skip the `package` import completely in the following code: ``` js import { something } from "package"; // package is marked as side effect free if (falsy) { something(); } ``` This could happen e. g. with code like `if(process.env.NODE_ENV === "production")` ### Testing Instructions <!-- Give a quick description of steps to test your changes. -->
- Loading branch information
Showing
11 changed files
with
315 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.