Experimental manual treeshaking leaves deptree.js #735
Comments
Cool, I forgot about this. Should be extremely easy to remove. It'll be in 1.1.1. Thanks, |
Great! I'm glad this helped 👍 |
@FdezRomero |
It does, but made no difference in file size so I disabled it for the moment. I did have some problems removing the decorators, but I haven't been able to isolate the issue so I'm not sure. |
As an aside, I saw --prod bundle reduction from 2.5MB to 2.2MB using the latest app-scripts with ionic_experimental_manual_treeshaking & ionic_experimental_purge_decorators. Randomly playing with other settings, adding ionic_use_experimental_babili increased the bundle to 2.3MB, removing that and adding ionic_use_experimental_closure reduced the bundle to 1.64MB, however the app no longer functioned. Is there a general tracking bug for bundle size and feedback on experimental bundling config? |
Also on a tangent to this issue, using ionic_experimental_manual_treeshaking in my app results in a browser console error "ReferenceError: Chip is not defined" (I don't use the Chip component in my app). Removing that and enabling closure does something similar but says "Uncaught TypeError: Cannot read property 'prototype' of undefined at b (main.js:1872)" - I suspect they may be related even though they are different optimisation paths. |
Closure tearing up the code doesn't surprise me. It is very experimental so far. The Thanks, |
After adding both flags aswell, the size is decreased by 46kb. Worked flawless, the only point I noticed that building the APK of android (--prod) tooks nearly 3-4 minutes, on old app-scripts it took about 30-40 seconds |
@graphefruit, it shouldn't take that long. It's very CPU intensive. Everything is in memory after the Thanks, |
@danbucholtz I gonna give it a try on a second pc and report back to you ;) Greetings |
There could be any number of factors. We use fast Macs so we know it's fast on those. Our thought process is it doesn't matter how long a prod build is (Within reason) since you shouldn't be doing them very often. It is much more beneficial to have a small, optimized, high performant output than a fast build process with a slower output. Thanks, |
You're definitely right Dan ;) Waiting 3 minutes to get a build which is decreased and much more faster is worth the wait. |
@danbucholtz deptree.js is still in release apk with app scripts 1.1.1.
Even without experimental flags.
…On Tue, 14 Feb 2017, 17:21 graphefruit ***@***.***> wrote:
You're definitly right dan ;) Waiting 3 minutes to get a build which is
decreased and much more faster is worth the wait.
For development we got ionic serve 👍
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#735 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AVoOP3_xJ43cyI-riQIg8U9F6TV-9QBiks5rccZegaJpZM4L-Prc>
.
|
Yep, I haven't looked at it yet. It'll get fixed soon. Thanks, |
I pushed a Thanks, |
Thanks Dan.
…On Thu, 16 Feb 2017, 17:05 Dan Bucholtz ***@***.***> wrote:
I pushed a 1.1.2 with this in it.
Thanks,
Dan
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#735 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AVoOP_q2v-dJ0ryhBiN1MA7HlH3qDTNZks5rdGXAgaJpZM4L-Prc>
.
|
Just updated to 1.1.2 - where am I supposed to specify the flag to enable ionic_experimental_manual_treeshaking? is it just ionic build ios --prod --ionic_experimental_manual_treeshaking? |
@ghenry22 if I understood correctly you could specify it in your package.json too, like
|
@peterpeterparker thanks! I actually found it in the app-scripts docs right just now as well |
Note: for support questions, please use one of these channels:
https://forum.ionicframework.com/
http://ionicworldwide.herokuapp.com/
Short description of the problem:
Enabling the experimental manual treeshaking feature in 1.1.0 leaves a dependency tree at
www/build/deptree.js
when none of the 3 dep. tree options are set totrue
.What behavior are you expecting?
Not having this file in the build unless specified in the config.
Steps to reproduce:
ionic_experimental_manual_treeshaking
to"true"
inpackage.json
. No printing dep. tree options set.ionic build android --prod --release
.www/build/deptree.js
(8.3 MB)Which @ionic/app-scripts version are you using?
1.1.0
Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)
The text was updated successfully, but these errors were encountered: