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(
.traceChild('generate-required-server-files')
.traceFn(() => ({
version: 1,
config: {
...config,
compress: false,
configFile: undefined,
},
config: { ...config, configFile: undefined },
appDir: dir,
files: [
ROUTES_MANIFEST,
......
......@@ -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(
......
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