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

chore: minify bundle, don't ship sourcemaps #901

Merged
merged 1 commit into from
May 5, 2022
Merged

chore: minify bundle, don't ship sourcemaps #901

merged 1 commit into from
May 5, 2022

Conversation

threepointone
Copy link
Contributor

We haven't found much use for sourcemaps in production, and we should probably minify the bundle anyway. This will also remove an dev only warnings react used to log.


My initial testing shows a 10 mb reduction in bundle size, but I'm letting CI run so I can do accurate before - after comparisons with dependencies included.

Added a changeset because this needs to be visible in case it causes a problem.

@changeset-bot
Copy link

changeset-bot bot commented May 5, 2022

🦋 Changeset detected

Latest commit: 7efd692

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

This PR includes changesets to release 1 package
Name Type
wrangler 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

@github-actions
Copy link
Contributor

github-actions bot commented May 5, 2022

A wrangler prerelease is available for testing. You can install this latest build in your project with:

npm install --save-dev https://prerelease-registry.developers.workers.dev/runs/2274602901/npm-package-wrangler-901

You can reference the automatically updated head of this PR with:

npm install --save-dev https://prerelease-registry.developers.workers.dev/prs/901/npm-package-wrangler-901

Or you can use npx with this latest build directly:

npx https://prerelease-registry.developers.workers.dev/runs/2274602901/npm-package-wrangler-901 dev path/to/script.js

@threepointone
Copy link
Contributor Author

Nice, 12.5 mb reduction.
image

Copy link
Contributor

@petebacondarwin petebacondarwin left a comment

Choose a reason for hiding this comment

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

SHIPIT

We haven't found much use for sourcemaps in production, and we should probably minify the bundle anyway. This will also remove an dev only warnings react used to log.
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