Open jaredpalmer opened 4 years ago
1st impression: it works :)
(test react app also works with compiled package)
just need to tune up configuration for typescript2 plugin:
https://github.com/ezolenko/rollup-plugin-typescript2#plugins-using-asyncawait
objectHashIgnoreUnknownHack: true
result:
oh, I see difference in bundle size: minified with terser: ~ 13900 b with closure compiler: ~ 12700 b (compilation_level: 'ADVANCED_OPTIMIZATIONS')
good! what are the tradeoffs of simple vs advanced optimization?
we should try running against formik to get a good gauge on % savings
nice work so far!
good! what are the tradeoffs of simple vs advanced optimization?
SIMPLE_OPTIMIZATIONS do same things as Terser plugin (and in my case optimized bundle size was little bit larger than terser's one) https://developers.google.com/closure/compiler/docs/api-tutorial3
BUT. there was a problem with 'ADVANCED_OPTIMIZATIONS' level in my lib with regeneratorRuntime polyfill
can be implemented as tsdx plugin
Dynamic import doesn't work on the closure compiler 🤔 https://github.com/google/closure-compiler/issues/2770
Steal it from here : https://github.com/ReactTraining/history/blob/dev/rollup.config.js