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

Minify the docs build #2053

Merged
merged 1 commit into from
Jun 18, 2019
Merged

Conversation

pugnascotia
Copy link
Contributor

This PR enables webpack's production mode in the docs build so that the output bundles are minified. Also configure the output to include '[name]', so that each chunk is named correctly. Clear out old assets from docs/ as well.

I tested the results with:

  1. yarn build-docs
  2. cd docs
  3. python3 -m http.server
  4. Browse to http://0.0.0.0:8000/

Note that the main bundle is still about 8MB, but shrinking that is a job for another day.

Enable webpack's production mode in the docs build so that the output
bundles are minified. Also configure the output to include '[name]', so
that each chunk is named correctly. Clear out old assets from `docs/` as
well.
@pugnascotia pugnascotia added documentation Issues or PRs that only affect documentation - will not need changelog entries chore labels Jun 18, 2019
@chandlerprall
Copy link
Contributor

Note that the main bundle is still about 8MB, but shrinking that is a job for another day.

I want to note that this changes the gzipped bundle from 3Mb to 1.7Mb 🥇

Copy link
Contributor

@chandlerprall chandlerprall left a comment

Choose a reason for hiding this comment

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

Changes LGTM; tested locally with the instructions in the description and verified significant decrease in over-the-wire bytes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore documentation Issues or PRs that only affect documentation - will not need changelog entries
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants