You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my code currently I only use the recurrent.LSTM() class, and with the change above I observed a 56% bundle size reduction after tree-shaking. That value will obviously vary from user to user, but there will probably be a reduction in bundle size. If legacy support is important then it's possible to ship both, cjs and esm code, but I personally don't think that this is necessary.
The text was updated successfully, but these errors were encountered:
Summary
ES modules are widely supported: MDN, caniuse and offer some advantages, like the ability of bundlers to do tree-shaking.
Basic example
In the most basic setup, only a single line of code would have to change in rollup.config.js:
Motivation
In my code currently I only use the
recurrent.LSTM()
class, and with the change above I observed a 56% bundle size reduction after tree-shaking. That value will obviously vary from user to user, but there will probably be a reduction in bundle size. If legacy support is important then it's possible to ship both,cjs
andesm
code, but I personally don't think that this is necessary.The text was updated successfully, but these errors were encountered: