Skip to content
This repository was archived by the owner on Oct 9, 2020. It is now read-only.
This repository was archived by the owner on Oct 9, 2020. It is now read-only.

systemJs builder buildStatic doesn't seem to do rollup #840

Open

Description

@dozer75

According to other issues (e.g. #709) it seems that buildStatic should do rollup if the modules is es2015/es6, but I can't get this to work with systemjs builder 0.16.12. I have done everything that it seems that should be done, but it just doesn't treeshake my solution. If i try to run rollup without systemjs builder it works.

Attach to this issue is a simple example project that I have problems with.

To reproduce it do the following:

  1. unzip the attachment
  2. run npm install
  3. run tsc
  4. run node_modules/.bin/gulp default

Open the bundle.js and see that ChildModule2 is included in the script even if it isn't referenced anywhere. If I use rollup directly the resulting bundle doesn't include ChildModule2.

I have tried to modify the buildStatic options to specifically have rollup: true with the same result, also tried other settings that differs with #709 without any difference.

It may be something I miss, but the documentation is at best lacking for this feature.

Attachment:
TreeShaker.zip

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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