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.
This introduces a `NextMode` enum that controls which mode Next.js Turbo is currently running in: * `NextMode::Development`: `next dev` * `NextMode::Build`: `next build` Requires vercel/turbo#4972 This also update Turbopack to `turbopack-230517.2` with the following changes: * vercel/turbo#4972 <!-- Alex Kirszenberg - Configure React development flag, inherit NODE_ENV from execution context --> --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
- Loading branch information
Showing
25 changed files
with
296 additions
and
151 deletions.
There are no files selected for viewing
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
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
6 changes: 6 additions & 0 deletions
6
packages/next-swc/crates/next-core/js/src/build/client/bootstrap.ts
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,6 @@ | ||
/** | ||
* This is the runtime entry point for Next.js client-side bundles. | ||
*/ | ||
|
||
import './shims' | ||
import 'next/dist/client/next' |
11 changes: 11 additions & 0 deletions
11
packages/next-swc/crates/next-core/js/src/build/client/shims.ts
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,11 @@ | ||
import '../shims' | ||
|
||
// Next uses __webpack_require__ extensively. | ||
globalThis.__webpack_require__ = (name) => { | ||
console.error( | ||
`__webpack_require__ is not implemented (when requiring ${name})` | ||
) | ||
} | ||
|
||
// initialize() needs `__webpack_public_path__` to be defined. | ||
globalThis.__webpack_public_path__ = undefined |
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,3 @@ | ||
// This ensures Next.js uses React 18's APIs (hydrateRoot) instead of React 17's | ||
// (hydrate). | ||
process.env.__NEXT_REACT_ROOT = 'true' |
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.