forked from vercel/next.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable App Router for all applications (vercel#49088)
Co-authored-by: Jimmy Lai <[email protected]> Co-authored-by: Shu Ding <[email protected]>
- Loading branch information
1 parent
ab55764
commit fe15a42
Showing
40 changed files
with
221 additions
and
368 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,7 +88,8 @@ | |
"busboy": "1.6.0", | ||
"caniuse-lite": "^1.0.30001406", | ||
"postcss": "8.4.14", | ||
"styled-jsx": "5.1.1" | ||
"styled-jsx": "5.1.1", | ||
"zod": "3.21.4" | ||
}, | ||
"peerDependencies": { | ||
"@opentelemetry/api": "^1.1.0", | ||
|
@@ -309,8 +310,7 @@ | |
"webpack": "5.74.0", | ||
"webpack-sources1": "npm:[email protected]", | ||
"webpack-sources3": "npm:[email protected]", | ||
"ws": "8.2.3", | ||
"zod": "3.21.4" | ||
"ws": "8.2.3" | ||
}, | ||
"resolutions": { | ||
"browserslist": "4.20.2", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* eslint-env jest */ | ||
|
||
import { join } from 'path' | ||
import { createNextDescribe } from 'e2e-utils' | ||
|
||
createNextDescribe( | ||
'disabled JS preloads', | ||
{ | ||
files: join(__dirname, '..'), | ||
}, | ||
({ next }) => { | ||
it('should render the page', async () => { | ||
const html = await next.render('/') | ||
expect(html).toMatch(/Hello World/) | ||
}) | ||
|
||
it('should not have JS preload links', async () => { | ||
const $ = await next.render$('/') | ||
expect($('link[rel=preload]').length).toBe(0) | ||
}) | ||
} | ||
) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* eslint-env jest */ | ||
|
||
import { join } from 'path' | ||
import { createNextDescribe } from 'e2e-utils' | ||
|
||
createNextDescribe( | ||
'Optimized loading', | ||
{ | ||
files: join(__dirname, '../'), | ||
}, | ||
({ next }) => { | ||
function runTests(url) { | ||
describe('page ' + url, () => { | ||
it(`should render the page ${url}`, async () => { | ||
const html = await next.render(url) | ||
expect(html).toMatch(/Hello World/) | ||
}) | ||
|
||
it('should not have JS preload links', async () => { | ||
const $ = await next.render$(url) | ||
expect($('link[rel=preload]').length).toBe(0) | ||
}) | ||
|
||
it('should load scripts with defer in head', async () => { | ||
const $ = await next.render$(url) | ||
expect($('script[async]').length).toBe(0) | ||
expect($('head script[defer]').length).toBeGreaterThan(0) | ||
}) | ||
}) | ||
} | ||
|
||
runTests('/') | ||
runTests('/page1') | ||
} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.