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

Bundle includes UA-Parser twice & other bundle issues #612

Closed
StefKors opened this issue Oct 30, 2024 · 1 comment
Closed

Bundle includes UA-Parser twice & other bundle issues #612

StefKors opened this issue Oct 30, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@StefKors
Copy link

StefKors commented Oct 30, 2024

Expected Behavior

the UA-parser package should be only imported once

Current Behavior

somewhere in the rollup config it imports UA-parser twice

Screenshot 2024-10-30 at 13 31 47

Possible Solution

see: https://github.com/StefKors/amplitude-client-vite
I've setup a basic repo to show what would be possible and highlight bundle issues in Amplitude Javascript. Reducing bundle size from 296 kb to 122.88 kB.

Using detect-ua instead of @amplitude/ua-parser-js will further reduce the bundle size to 96.37 kB

Steps to Reproduce

  1. configure rollup bundle visualizer
  2. run npm run build

Environment

  • JS SDK Version:
  • Installation Method:
  • Browser and Version:
@StefKors StefKors added the bug Something isn't working label Oct 30, 2024
@izaaz
Copy link
Contributor

izaaz commented Oct 30, 2024

@StefKors - this library is no longer actively being maintained. Can you please use the Browser V2 SDK instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants