diff --git a/packages/next/build/index.ts b/packages/next/build/index.ts index 89cc94663989c..7f308632333f5 100644 --- a/packages/next/build/index.ts +++ b/packages/next/build/index.ts @@ -551,11 +551,7 @@ export default async function build( .traceChild('generate-required-server-files') .traceFn(() => ({ version: 1, - config: { - ...config, - compress: false, - configFile: undefined, - }, + config: { ...config, configFile: undefined }, appDir: dir, files: [ ROUTES_MANIFEST, diff --git a/test/production/required-server-files.test.ts b/test/production/required-server-files.test.ts index 25779a1b79f12..5beb07895d099 100644 --- a/test/production/required-server-files.test.ts +++ b/test/production/required-server-files.test.ts @@ -107,6 +107,12 @@ describe('should set-up next', () => { if (server) await killApp(server) }) + it('`compress` should be `true` by default', async () => { + expect( + await fs.readFileSync(join(next.testDir, 'standalone/server.js'), 'utf8') + ).toContain('"compress":true') + }) + it('should output middleware correctly', async () => { expect( await fs.pathExists(