Skip to content

perf: drop @ampproject/toolbox-optimizer to reduce the server bundle size#700

Merged
vicb merged 1 commit intomainfrom
vic/optamp
Jun 5, 2025
Merged

perf: drop @ampproject/toolbox-optimizer to reduce the server bundle size#700
vicb merged 1 commit intomainfrom
vic/optamp

Conversation

@vicb
Copy link
Copy Markdown
Contributor

@vicb vicb commented Jun 4, 2025

The toolbox optimizer pulls severals MB of dependencies (caniuse-lite, terser, acorn, ...)

Droppping it save >3MB code size on the playground14 example

Before:

image

After:

image

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jun 4, 2025

🦋 Changeset detected

Latest commit: 5f66c79

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

This PR includes changesets to release 1 package
Name Type
@opennextjs/cloudflare 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

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Jun 4, 2025

Open in StackBlitz

pnpm add https://pkg.pr.new/@opennextjs/cloudflare@700

commit: 5f66c79

@vicb vicb requested review from conico974 and james-elicx June 4, 2025 10:58
Copy link
Copy Markdown
Collaborator

@james-elicx james-elicx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@vicb
Copy link
Copy Markdown
Contributor Author

vicb commented Jun 5, 2025

Thanks James!

@vicb vicb merged commit 56e9366 into main Jun 5, 2025
7 checks passed
@vicb vicb deleted the vic/optamp branch June 5, 2025 09:56
@LubomirGeorgiev
Copy link
Copy Markdown

This looks so great

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.

3 participants