Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

minify HTML templates #193

Merged
merged 4 commits into from
Mar 11, 2018
Merged

minify HTML templates #193

merged 4 commits into from
Mar 11, 2018

Conversation

Rich-Harris
Copy link
Member

fixes #15. This is separate to #172 — it only minifies app/template.html itself (and only in prod), not the end result with rendered components. Still, it shaves off a few bytes which is nice.

I suppose we could improve on this by doing the minification at build time and writing the template to the build directory — something to consider at the same time as #181.

@Rich-Harris
Copy link
Member Author

I figured it was worth addressing #181 at the same time. This PR adds the following environment variables:

  • SAPPER_BASE — defaults to cwd
  • SAPPER_APP — defaults to ${SAPPER_BASE}/app
  • SAPPER_ROUTES — defaults to ${SAPPER_BASE}/routes

SAPPER_DEST can still be overridden during dev, if necessary (for build and export it's part of the command itself).

Also, minification now happens at build time, which means a faster startup.

@Rich-Harris Rich-Harris merged commit e1b5e33 into master Mar 11, 2018
@Rich-Harris Rich-Harris deleted the gh-15 branch March 11, 2018 18:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Minify HTML templates
1 participant