-
Notifications
You must be signed in to change notification settings - Fork 27.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pull in jsx-dev-runtime for react-server
Source: facebook/react#28921
- Loading branch information
Showing
8 changed files
with
2,738 additions
and
2 deletions.
There are no files selected for viewing
1,318 changes: 1,318 additions & 0 deletions
1,318
...ext/src/compiled/react-experimental/cjs/react-jsx-dev-runtime.react-server.development.js
Large diffs are not rendered by default.
Oops, something went wrong.
40 changes: 40 additions & 0 deletions
40
...next/src/compiled/react-experimental/cjs/react-jsx-dev-runtime.react-server.production.js
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,40 @@ | ||
/** | ||
* @license React | ||
* react-jsx-dev-runtime.react-server.production.js | ||
* | ||
* Copyright (c) Meta Platforms, Inc. and affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
"use strict"; | ||
var React = require("next/dist/compiled/react"), | ||
REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), | ||
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"); | ||
if (!React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE) | ||
throw Error( | ||
'The "react" package in this environment is not configured correctly. The "react-server" condition must be enabled in any environment that runs React Server Components.' | ||
); | ||
function jsxProd(type, config, maybeKey) { | ||
var key = null; | ||
void 0 !== maybeKey && (key = "" + maybeKey); | ||
void 0 !== config.key && (key = "" + config.key); | ||
if ("key" in config) { | ||
maybeKey = {}; | ||
for (var propName in config) | ||
"key" !== propName && (maybeKey[propName] = config[propName]); | ||
} else maybeKey = config; | ||
config = maybeKey.ref; | ||
return { | ||
$$typeof: REACT_ELEMENT_TYPE, | ||
type: type, | ||
key: key, | ||
ref: void 0 !== config ? config : null, | ||
props: maybeKey | ||
}; | ||
} | ||
exports.Fragment = REACT_FRAGMENT_TYPE; | ||
exports.jsx = jsxProd; | ||
exports.jsxDEV = void 0; | ||
exports.jsxs = jsxProd; |
7 changes: 7 additions & 0 deletions
7
packages/next/src/compiled/react-experimental/jsx-dev-runtime.react-server.js
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,7 @@ | ||
'use strict'; | ||
|
||
if (process.env.NODE_ENV === 'production') { | ||
module.exports = require('./cjs/react-jsx-dev-runtime.react-server.production.js'); | ||
} else { | ||
module.exports = require('./cjs/react-jsx-dev-runtime.react-server.development.js'); | ||
} |
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.