From f32d093a280faafff024228c12bb438156ec34d7 Mon Sep 17 00:00:00 2001 From: Emanuele Stoppa Date: Thu, 3 Aug 2023 12:19:18 +0100 Subject: [PATCH] feat: change `compressHTML` default value to `true` (#7918) Co-authored-by: Sarah Rainsberger --- .changeset/unlucky-ravens-type.md | 14 ++++++++++++++ packages/astro/src/core/config/schema.ts | 2 +- packages/astro/test/ssr-manifest.test.js | 1 - 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 .changeset/unlucky-ravens-type.md diff --git a/.changeset/unlucky-ravens-type.md b/.changeset/unlucky-ravens-type.md new file mode 100644 index 000000000..88b0aa748 --- /dev/null +++ b/.changeset/unlucky-ravens-type.md @@ -0,0 +1,14 @@ +--- +'astro': major +--- + +The property `compressHTML` is now `true` by default. Setting this value to `true` is no longer required. + +If you do not want to minify your HTML output, you must set this value to `false` in `astro.config.mjs`. + +```diff +import {defineConfig} from "astro/config"; +export default defineConfig({ ++ compressHTML: false +}) +``` diff --git a/packages/astro/src/core/config/schema.ts b/packages/astro/src/core/config/schema.ts index 64cb4d16a..282f7844e 100644 --- a/packages/astro/src/core/config/schema.ts +++ b/packages/astro/src/core/config/schema.ts @@ -29,7 +29,7 @@ const ASTRO_CONFIG_DEFAULTS = { split: false, excludeMiddleware: false, }, - compressHTML: false, + compressHTML: true, server: { host: false, port: 4321, diff --git a/packages/astro/test/ssr-manifest.test.js b/packages/astro/test/ssr-manifest.test.js index 4e5521220..bd9483505 100644 --- a/packages/astro/test/ssr-manifest.test.js +++ b/packages/astro/test/ssr-manifest.test.js @@ -11,7 +11,6 @@ describe('astro:ssr-manifest', () => { fixture = await loadFixture({ root: './fixtures/ssr-manifest/', output: 'server', - compressHTML: true, adapter: testAdapter(), }); await fixture.build();