Closed olaf89 closed 7 years ago
yes, it should work I just checked, and ng core modules switched to es6, so we switch too
waiting for CI to pass...
tests are passing but, sourcemap-istanbul-instrumenter-loader failed
released as v1.3.0 please try and update me
Hey, wow thanks for such a quick feedback great stuff! Unfortunately it does not seem to work as i would expect. When importing only alert Module using angular2-webpack-starter (aot): version: Bundle size 1.2.6: 126.8kb 1.3.0: 117.96kb But overall looks like all not used modules are included in bundle. Screen for 1.3.0:
@olaf89 Btw, what software did you use to produce that pic?
@ctrl-brk im using webpack-bundle-analyzer
Woah, nice tool :O
For me, ng2bs is using only used packages, not sure if it is because of tree shaking or because I'm importing it directly - ... from 'ng2-bootstrap/datepicker'
@olaf89 please try v1.3.2
Hello, @valorkin I tried but when importing from 'ng2-bootstrap' still whole library is included as well as moment.js.
BUT when tring to do it @GuskiS way (by importing from 'ng2-bootstrap/alert') the result is amazing: not only all not used modules are dropped but also moment.js Result:
This is awesome! Moment is required only by datepicker
@valorkin Do you plan to remove momentjs in future?
More likely to make it optional It provides localization, so it is pretty good
@valorkin I recently had issues with moment in a webpack build for angular2. If it's included in an eager module webpack for some reason will not produce chunks for lazy routes
Hello, while i was investigating my bundle size using aot build version. I noticed that even when using only one module from ng2-bootstrap the whole library is added as well as moment.js. This makes it quite heavy. Is there any way to improve this? For example changing commonjs modules to ES2015 so it can be tree shaken? Or do you have any other advice which would help with this issue? This is how adding alert module influenced angular2 webpack starter bundle size (aot prod build) :