Skip to content
This repository was archived by the owner on Sep 2, 2023. It is now read-only.
This repository was archived by the owner on Sep 2, 2023. It is now read-only.

Feature: Tree shaking #102

Description

@GeoffreyBooth
  • Module bundlers like Rollup can do tree-shaking to create a bundle that includes only the code that’s used.
  • If a member is imported from a CommonJS module using the correct syntax, the tree shaking can include that module.

So the first part goes to the heart of ESM being statically analyzable, so that an all-ESM module graph can get pruned so that a bundle with only the used code is generated.

The second part I assume includes code like import { shuffle } from 'underscore' (as opposed to import _ from 'underscore') where we know that shuffle is the member being imported and so therefore the module graph can include just shuffle rather than all of underscore. See also #100 (comment)

Use case 12.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions