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

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

Open
dozer75 opened this issue Jan 14, 2018 · 0 comments
Open

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

dozer75 opened this issue Jan 14, 2018 · 0 comments

Comments

@dozer75
Copy link

dozer75 commented Jan 14, 2018

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant