Skip to content

fix(analytics): use more unique chunk name for middleware#1355

Closed
blurrah wants to merge 1 commit intosegmentio:masterfrom
blurrah:blurrah/fix-middleware-chunk-name
Closed

fix(analytics): use more unique chunk name for middleware#1355
blurrah wants to merge 1 commit intosegmentio:masterfrom
blurrah:blurrah/fix-middleware-chunk-name

Conversation

@blurrah
Copy link
Copy Markdown

@blurrah blurrah commented Apr 14, 2026

Changes the source middleware chunk name as the current name breaks Next.js with node runtime using a middleware.js, see #1339

  • I've included a changeset (psst. run yarn changeset. Read about changesets here).

Fixes issue with next.js where it conflicts with it's middleware.js chunk when using webpack
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 14, 2026

🦋 Changeset detected

Latest commit: c5869bf

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@segment/analytics-next Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@chenxzhang
Copy link
Copy Markdown
Collaborator

will open a separate pr to make the change

chenxzhang added a commit that referenced this pull request Apr 15, 2026
Fixes issue with Next.js where the "middleware" webpack chunk name
collides with Next.js's middleware.js entrypoint when using the
Node.js runtime.

Based on #1355 by @blurrah.
@chenxzhang chenxzhang closed this Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants