-
Notifications
You must be signed in to change notification settings - Fork 26k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use env var to switch next.js to turbopack mode #51353
Merged
Merged
Changes from 12 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
31f33cb
use env var to switch next.js to turbopack mode
sokra 4c9333b
disable not working test case
sokra 973bc30
fixup
sokra 984867a
remove old code
sokra 996f668
remove turbo option
sokra 046ce8d
update jest config
sokra d6e2f4d
fixup
sokra a05c5cd
remove unneccessary check
sokra 96bf864
remove non working test case
sokra 0193415
update turbopack test
sokra 4b48a5b
update telemetry test
sokra cedea5a
disable the test the right way
sokra 266a1ac
Merge branch 'canary' into sokra/force-turbopack
sokra 139d4f6
Merge branch 'canary' into sokra/force-turbopack
sokra cf3aea7
Merge branch 'canary' into sokra/force-turbopack
sokra 8bc377a
Merge branch 'canary' into sokra/force-turbopack
sokra 3b24101
Merge branch 'canary' into sokra/force-turbopack
sokra File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2732,38 +2732,6 @@ describe('Custom routes', () => { | |
runTests(true) | ||
}) | ||
|
||
// enable once https://github.com/vercel/turbo/pull/3894 is landed | ||
describe.skip('dev mode (turbo)', () => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't need that. Instead we can add custom-routes to the tests-manifest to enable that |
||
let nextConfigContent | ||
|
||
beforeAll(async () => { | ||
// ensure cache with rewrites disabled doesn't persist | ||
// after enabling rewrites | ||
await fs.remove(join(appDir, '.next')) | ||
nextConfigContent = await fs.readFile(nextConfigPath, 'utf8') | ||
await fs.writeFile( | ||
nextConfigPath, | ||
nextConfigContent.replace('// no-rewrites comment', 'return []') | ||
) | ||
|
||
const tempPort = await findPort() | ||
const tempApp = await launchApp(appDir, tempPort, { turbo: true }) | ||
await renderViaHTTP(tempPort, '/') | ||
|
||
await killApp(tempApp) | ||
await fs.writeFile(nextConfigPath, nextConfigContent) | ||
|
||
appPort = await findPort() | ||
app = await launchApp(appDir, appPort, { turbo: true }) | ||
buildId = 'development' | ||
}) | ||
afterAll(async () => { | ||
await fs.writeFile(nextConfigPath, nextConfigContent) | ||
await killApp(app) | ||
}) | ||
runTests(true, true) | ||
}) | ||
|
||
describe('no-op rewrite', () => { | ||
beforeAll(async () => { | ||
appPort = await findPort() | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Why not
NEXT_TURBOPACK
instead? This seems like a Next.js specific option.