Skip to content

Commit

Permalink
feat: change compressHTML default value to true (#7918)
Browse files Browse the repository at this point in the history
Co-authored-by: Sarah Rainsberger <[email protected]>
  • Loading branch information
ematipico and sarah11918 authored Aug 3, 2023
1 parent 1962392 commit 1c076be
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
14 changes: 14 additions & 0 deletions .changeset/unlucky-ravens-type.md
Original file line number Diff line number Diff line change
@@ -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
})
```
2 changes: 1 addition & 1 deletion packages/astro/src/core/config/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const ASTRO_CONFIG_DEFAULTS = {
split: false,
excludeMiddleware: false,
},
compressHTML: false,
compressHTML: true,
server: {
host: false,
port: 4321,
Expand Down
1 change: 0 additions & 1 deletion packages/astro/test/ssr-manifest.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ describe('astro:ssr-manifest', () => {
fixture = await loadFixture({
root: './fixtures/ssr-manifest/',
output: 'server',
compressHTML: true,
adapter: testAdapter(),
});
await fixture.build();
Expand Down

0 comments on commit 1c076be

Please sign in to comment.