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
The current dist/browser.js is a monolithic minified CJS bundle.
It is my understanding that this format is only preferable if including SecretJS through a <script> tag -- but when using most forms of frontend build systems (Webpack, etc.) it prevents dead code elimination, considerably inflating the final bundle downloaded by the browser. In my case, [email protected] (and the similarly packaged [email protected]) account for nearly half the total bundle size - and we use just a few methods from the the bank and compute APIs...
I suggest it would be beneficial if the browser field in package.json pointed to an unminified and/or sourcemapped ESM build instead. That way the library users could do their own optimization.
The text was updated successfully, but these errors were encountered:
The current
dist/browser.js
is a monolithic minified CJS bundle.It is my understanding that this format is only preferable if including SecretJS through a
<script>
tag -- but when using most forms of frontend build systems (Webpack, etc.) it prevents dead code elimination, considerably inflating the final bundle downloaded by the browser. In my case,[email protected]
(and the similarly packaged[email protected]
) account for nearly half the total bundle size - and we use just a few methods from the thebank
andcompute
APIs...I suggest it would be beneficial if the
browser
field inpackage.json
pointed to an unminified and/or sourcemapped ESM build instead. That way the library users could do their own optimization.The text was updated successfully, but these errors were encountered: