Skip to content

Commit 7723c4c

Browse files
ematipicosarah11918
andcommitted
feat: change compressHTML default value to true (#7918)
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
1 parent c022a42 commit 7723c4c

3 files changed

Lines changed: 15 additions & 2 deletions

File tree

.changeset/unlucky-ravens-type.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'astro': major
3+
---
4+
5+
The property `compressHTML` is now `true` by default. Setting this value to `true` is no longer required.
6+
7+
If you do not want to minify your HTML output, you must set this value to `false` in `astro.config.mjs`.
8+
9+
```diff
10+
import {defineConfig} from "astro/config";
11+
export default defineConfig({
12+
+ compressHTML: false
13+
})
14+
```

packages/astro/src/core/config/schema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const ASTRO_CONFIG_DEFAULTS = {
2929
split: false,
3030
excludeMiddleware: false,
3131
},
32-
compressHTML: false,
32+
compressHTML: true,
3333
server: {
3434
host: false,
3535
port: 4321,

packages/astro/test/ssr-manifest.test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ describe('astro:ssr-manifest', () => {
1111
fixture = await loadFixture({
1212
root: './fixtures/ssr-manifest/',
1313
output: 'server',
14-
compressHTML: true,
1514
adapter: testAdapter(),
1615
});
1716
await fixture.build();

0 commit comments

Comments
 (0)