Unverified Commit 0d642f12 authored by Balázs Orbán's avatar Balázs Orbán Committed by GitHub

feat: make `compress` configurable in standalone mode (#33717)

Fixes #33696

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `yarn lint`
parent c551a329
...@@ -551,11 +551,7 @@ export default async function build( ...@@ -551,11 +551,7 @@ export default async function build(
.traceChild('generate-required-server-files') .traceChild('generate-required-server-files')
.traceFn(() => ({ .traceFn(() => ({
version: 1, version: 1,
config: { config: { ...config, configFile: undefined },
...config,
compress: false,
configFile: undefined,
},
appDir: dir, appDir: dir,
files: [ files: [
ROUTES_MANIFEST, ROUTES_MANIFEST,
......
...@@ -107,6 +107,12 @@ describe('should set-up next', () => { ...@@ -107,6 +107,12 @@ describe('should set-up next', () => {
if (server) await killApp(server) 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 () => { it('should output middleware correctly', async () => {
expect( expect(
await fs.pathExists( await fs.pathExists(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment