Provide a way to lazy load AnalyticsBrowser without pulling in all the other dependencies

Open
#965 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
typescript

Research direction

Start by reproducing the main-bundle impact of importing AnalyticsBrowser from @segment/analytics-next, then inspect the package entry points and dependency-loading path. Done means AnalyticsBrowser can be lazy loaded without pulling unrelated dependencies into the main bundle, with the bundle impact verified.

Written by the indexing model from the issue text.

Description

enhancement

It appears that at the moment, simply importing import { AnalyticsBrowser } from '@segment/analytics-next'; causes various dependencies get pulled into the main bundle. I can md5 and other things I would not expect.

Dominant language
TypeScript
Stars
477
Forks
160
Avg merge
6h 19m
Merged PRs (30d)
4

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from segmentio/analytics-next

All issues in segmentio/analytics-next

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.