Open Joee94 opened 5 months ago
Thanks for pointing this out. We'll work on a fix on our side
In the meantime, you could try importing only the core bundle, rather than the default bundle (which includes everything in authjs). The core bundle should save a bit of bloat
import OktaAuth from '@okta/okta-auth-js/core';
Thanks for pointing this out. We'll work on a fix on our side
In the meantime, you could try importing only the core bundle, rather than the default bundle (which includes everything in authjs). The core bundle should save a bit of bloat
import OktaAuth from '@okta/okta-auth-js/core';
Thank you !
Any update on this? I see there is a branch here https://github.com/okta/okta-auth-js/tree/jp-esm-license but it's not been touched in a few months
Describe the bug
When running the production build of our app using![Screenshot 2024-01-15 at 10 47 10](https://github.com/okta/okta-auth-js/assets/3847039/aabfd8be-12ba-46a7-b3fc-6f64fe9b7f28)
okta-auth-js
andokta-react
the okta license is added into the js file 196 times, adding 122kb in size.Reproduction Steps?
Using
okta-auth-js
andokta-react
run a production build in vite with minify set totrue
In the output .js file should be a comment for every okta function.SDK Versions
System: OS: macOS 13.6.2 CPU: (12) arm64 Apple M2 Pro Memory: 4.23 GB / 32.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 18.19.0 - ~/.nvm/versions/node/v18.19.0/bin/node Yarn: 1.22.11 - ~/.nvm/versions/node/v18.19.0/bin/yarn npm: 10.2.3 - ~/.nvm/versions/node/v18.19.0/bin/npm Browsers: Chrome: 120.0.6099.216 Safari: 17.2 npmPackages: @okta/okta-auth-js: ^7.5.0 => 7.5.0 @okta/okta-react: ^6.7.0 => 6.7.0
Additional Information?
This would be trivial to strip out as part of our build, but we're keen not to break any licensing laws and it would be good to have this potentially fixed on oktas side.
If this is not fixable on your side then it's important to know wether on not we can remove all but 1 of these licensing comments.