-
Notifications
You must be signed in to change notification settings - Fork 122
-
Notifications
You must be signed in to change notification settings - Fork 122
How to properly tree-shake with buildstatic? #709
Comments
Rollup only works for ES6 modules and my guess is that your gulp task transpiles to either |
@asapach Thanks for the link. I followed the advice and installed systemjs.config.js
tsonfig.json
systemjs-builder gulp task
When I execute the gulp task, this error is thrown:
The path |
To resolve this I had to create another task that runs the typescript compiler first, to transpile
After this, I could run the bundling task:
As @asapach pointed out, I needed to set |
Please bear with me; I'm new to professional build tools.
I'm learning
Angular 2
withtypescript 2
. I usegulp
to manage build tasks. First I transpile TS to JS withgulp-typescript
Then I use
SystemJS-builder
to create one self-executing bundle:I would still like to reduce the size of
bundle.js
. Is it possible to use this tool to do tree-shaking and remove unused functions/classes from dependencies?I've tried setting
rollup:true
inbuildStatic
's 3rd parameter, but the resulting bundle has the exact same size.systemjs-builder 0.15.31
,systemjs 0.19.39
The text was updated successfully, but these errors were encountered: