The optimized javascript should be linked in a smarter way, such that we can make use of optimizations such as tree shaking and dead code elimination. Rollup is a good candidate for linking ES2015 code, however this means we either need to combine Rollup with Babel, for the ES2015 => ES5 transformations, or make this two separate transformations, where Rollup does a ES2015 => ES2015 transformation, which is then fed to Babel for the final ES5 transformation.
Current Behavior
Currently, the output bundle is just a concatenation of all javascript files that the unoptimized build outputs. This works, and isn't terrible, but we can do better.
Expected Behavior
The optimized javascript should be linked in a smarter way, such that we can make use of optimizations such as tree shaking and dead code elimination. Rollup is a good candidate for linking ES2015 code, however this means we either need to combine Rollup with Babel, for the ES2015 => ES5 transformations, or make this two separate transformations, where Rollup does a ES2015 => ES2015 transformation, which is then fed to Babel for the final ES5 transformation.
Current Behavior
Currently, the output bundle is just a concatenation of all javascript files that the unoptimized build outputs. This works, and isn't terrible, but we can do better.