You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 9, 2020. It is now read-only.
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:
unzip the attachment
run npm install
run tsc
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.
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 runrollup
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:
npm install
tsc
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 haverollup: 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
The text was updated successfully, but these errors were encountered: