Skip to content

Rollup's tree-shaking isn't applying to exported async functions #492

Description

@ericf

I have a utils.js module which exports multiple, named, async functions. When importer.js imports one of these async function exports, Rollup is including all of them in the bundle. It seems that Rollup's tree-shaking algo is getting caught up with the async functions, when I removed the async/await keywords from the utils.js module, only the imported functions were included in the bundle, as expected. The way I worked around this was to put each function in its own module.

I'm using the latest versions of rollup, rollup-plugin-babel, babel-preset-stage-3, and babel-regenerator-runtime.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions