mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
763ff2d1e4
* TDD pattern development * add compact property when the user run pnpm run build * add minification for pro * fix yaml file collision * fix yaml collision * fix pageage file * optimize unit test * fix revert code * fix comment * update yaml * fix default value * add test for dev * Update packages/astro/test/astro-minification-html.test.js Co-authored-by: Emanuele Stoppa <my.burning@gmail.com> * Update packages/astro/test/astro-minification-html.test.js Co-authored-by: Emanuele Stoppa <my.burning@gmail.com> * Update packages/astro/test/astro-minification-html.test.js Co-authored-by: Emanuele Stoppa <my.burning@gmail.com> * Update packages/astro/test/astro-minification-html.test.js Co-authored-by: Emanuele Stoppa <my.burning@gmail.com> * Update packages/astro/test/astro-minification-html.test.js Co-authored-by: Emanuele Stoppa <my.burning@gmail.com> * Update the docs to reflect it's opt-in * Add tests for SSR * Document how the tests remove the doctype line * Expand on the changeset * rename for slice -100 * Updates based on PR comments * optimize description * Update packages/astro/src/@types/astro.ts Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> --------- Co-authored-by: wuls <linsheng.wu@beantechs.com> Co-authored-by: Matthew Phillips <matthew@skypack.dev> Co-authored-by: Matthew Phillips <matthew@matthewphillips.info> Co-authored-by: Emanuele Stoppa <my.burning@gmail.com> Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
469 B
469 B
astro |
---|
minor |
Adds an opt-in way to minify the HTML output.
Using the compressHTML
option Astro will remove whitespace from Astro components. This only applies to components written in .astro
format and happens in the compiler to maximize performance. You can enable with:
import { defineConfig } from 'astro/config';
export default defineConfig({
compressHTML: true
});
Compression occurs both in development mode and in the final build.