Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Okta License appears in build 196 times #1484

Open
Joee94 opened this issue Jan 15, 2024 · 3 comments
Open

Okta License appears in build 196 times #1484

Joee94 opened this issue Jan 15, 2024 · 3 comments
Labels

Comments

@Joee94
Copy link

Joee94 commented Jan 15, 2024

Describe the bug

When running the production build of our app using okta-auth-js and okta-react the okta license is added into the js file 196 times, adding 122kb in size.
Screenshot 2024-01-15 at 10 47 10

Reproduction Steps?

Using okta-auth-js and okta-react run a production build in vite with minify set to true
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.

@Joee94 Joee94 added the bug label Jan 15, 2024
@jaredperreault-okta
Copy link
Contributor

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';

@Joee94
Copy link
Author

Joee94 commented Jan 19, 2024

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 !

@Joee94
Copy link
Author

Joee94 commented Apr 15, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants