It is worth mentioning that Royale uses Google's Closure compiler when creating release builds. Closure compiler does very advanced JavaScript code analysis that eliminates unused code from the final output, so it has a very similar effect to tree shaking.
The ability to integrate into a webpack build pipeline would be really nice, though, since webpack is such a popular tool in the JS ecosystem. -- Josh Tynjala Bowler Hat LLC <https://bowlerhat.dev> On Tue, Oct 8, 2019 at 1:00 AM Chris Velevitch <[email protected]> wrote: > If the whole point of PAYG is to eliminate unused code from being > included in the final app distribution, then I'd like to suggest that > we take advantage of the tools the JavaScript ecosystem already has > for eliminating unused code. > > I think we should take a look at Webpack [1] and create a compilation > pipeline that feeds into Webpack to create the final compacted > distributable app. > > > > [1] https://webpack.js.org/guides/tree-shaking/ >
