diff --git a/packages/next/next-server/server/config.ts b/packages/next/next-server/server/config.ts index deaa89506e770f2..4b61b29701e22bd 100644 --- a/packages/next/next-server/server/config.ts +++ b/packages/next/next-server/server/config.ts @@ -44,7 +44,7 @@ const defaultConfig: { [key: string]: any } = { ), css: false, documentMiddleware: false, - granularChunks: false, + granularChunks: true, modern: false, plugins: false, profiling: false, diff --git a/test/integration/build-output/test/index.test.js b/test/integration/build-output/test/index.test.js index a4ebdc0ccdfa89a..932d688b353a1f8 100644 --- a/test/integration/build-output/test/index.test.js +++ b/test/integration/build-output/test/index.test.js @@ -25,7 +25,7 @@ describe('Build Output', () => { expect(stdout).toMatch(/\/ [ ]* \d{1,} B/) expect(stdout).toMatch(/\+ shared by all [ 0-9.]* kB/) expect(stdout).toMatch(/ runtime\/main\.js [ 0-9.]* kB/) - expect(stdout).toMatch(/ chunks\/commons\.js [ 0-9. ]* kB/) + expect(stdout).toMatch(/ chunks\/framework\.js [ 0-9. ]* kB/) expect(stdout).not.toContain('/_document') expect(stdout).not.toContain('/_app') @@ -51,7 +51,7 @@ describe('Build Output', () => { expect(stdout).toMatch(/\/_app [ ]* \d{1,} B/) expect(stdout).toMatch(/\+ shared by all [ 0-9.]* kB/) expect(stdout).toMatch(/ runtime\/main\.js [ 0-9.]* kB/) - expect(stdout).toMatch(/ chunks\/commons\.js [ 0-9. ]* kB/) + expect(stdout).toMatch(/ chunks\/framework\.js [ 0-9. ]* kB/) expect(stdout).not.toContain('/_document') expect(stdout).not.toContain('/_error') @@ -78,7 +78,7 @@ describe('Build Output', () => { expect(stdout).toMatch(/\/hybrid [ 0-9.]* B/) expect(stdout).toMatch(/\+ shared by all [ 0-9.]* kB/) expect(stdout).toMatch(/ runtime\/main\.js [ 0-9.]* kB/) - expect(stdout).toMatch(/ chunks\/commons\.js [ 0-9. ]* kB/) + expect(stdout).toMatch(/ chunks\/framework\.js [ 0-9. ]* kB/) expect(stdout).not.toContain('/_document') expect(stdout).not.toContain('/_error') @@ -103,7 +103,7 @@ describe('Build Output', () => { expect(stdout).toMatch(/λ \/_error [ ]* \d{1,} B/) expect(stdout).toMatch(/\+ shared by all [ 0-9.]* kB/) expect(stdout).toMatch(/ runtime\/main\.js [ 0-9.]* kB/) - expect(stdout).toMatch(/ chunks\/commons\.js [ 0-9. ]* kB/) + expect(stdout).toMatch(/ chunks\/framework\.js [ 0-9. ]* kB/) expect(stdout).not.toContain('/_document') expect(stdout).not.toContain('/_app') diff --git a/test/integration/preload-viewport/pages/multi-prefetch.js b/test/integration/preload-viewport/pages/multi-prefetch.js index 9a4283f3b52fec9..9d03878008c0d52 100644 --- a/test/integration/preload-viewport/pages/multi-prefetch.js +++ b/test/integration/preload-viewport/pages/multi-prefetch.js @@ -8,6 +8,10 @@ export default () => { router.prefetch('/dynamic/[hello]') router.prefetch('/dynamic/[hello]') router.prefetch('/dynamic/[hello]') + + router.prefetch('/dynamic/first') + router.prefetch('/dynamic/first') + router.prefetch('/dynamic/first') }, [router]) return (
diff --git a/test/integration/size-limit/test/index.test.js b/test/integration/size-limit/test/index.test.js index b018ccfabe9df29..a4e986d5265f2b3 100644 --- a/test/integration/size-limit/test/index.test.js +++ b/test/integration/size-limit/test/index.test.js @@ -81,7 +81,7 @@ describe('Production response size', () => { ) // These numbers are without gzip compression! - const delta = responseSizeKilobytes - 230 + const delta = responseSizeKilobytes - 234 expect(delta).toBeLessThanOrEqual(0) // don't increase size expect(delta).toBeGreaterThanOrEqual(-1) // don't decrease size without updating target }) @@ -101,7 +101,7 @@ describe('Production response size', () => { ) // These numbers are without gzip compression! - const delta = responseSizeKilobytes - 197 + const delta = responseSizeKilobytes - 202 expect(delta).toBeLessThanOrEqual(0) // don't increase size expect(delta).toBeGreaterThanOrEqual(-1) // don't decrease size without updating target })