summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Emanuele Stoppa <my.burning@gmail.com> 2023-08-03 12:19:18 +0100
committerGravatar Emanuele Stoppa <my.burning@gmail.com> 2023-08-08 11:02:51 +0100
commitf32d093a280faafff024228c12bb438156ec34d7 (patch)
tree74c54f7a10f6fc981a2535d3f17a4e75b1640a8b
parent7511a4980fd36536464c317de33a5190427f430a (diff)
downloadastro-f32d093a280faafff024228c12bb438156ec34d7.tar.gz
astro-f32d093a280faafff024228c12bb438156ec34d7.tar.zst
astro-f32d093a280faafff024228c12bb438156ec34d7.zip
feat: change `compressHTML` default value to `true` (#7918)
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
-rw-r--r--.changeset/unlucky-ravens-type.md14
-rw-r--r--packages/astro/src/core/config/schema.ts2
-rw-r--r--packages/astro/test/ssr-manifest.test.js1
3 files changed, 15 insertions, 2 deletions
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();