-
Notifications
You must be signed in to change notification settings - Fork 47k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert to CJS but allow dynamic imports in CJS
- Loading branch information
1 parent
44f6ab8
commit 45fac1a
Showing
14 changed files
with
88 additions
and
94 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
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 |
---|---|---|
|
@@ -7,4 +7,4 @@ | |
* @flow | ||
*/ | ||
|
||
export * from '../src/ReactFlightDOMClientNode.js'; | ||
export * from './src/ReactFlightDOMClientNode'; |
10 changes: 0 additions & 10 deletions
10
...eact-server-dom-webpack/esm/react-server-dom-webpack-server.node.unbundled.development.js
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
...t-server-dom-webpack/esm/react-server-dom-webpack-server.node.unbundled.production.min.js
This file was deleted.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
packages/react-server-dom-webpack/npm/client.node.unbundled.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-server-dom-webpack-client.node.unbundled.production.min.js'); | ||
} else { | ||
module.exports = require('./cjs/react-server-dom-webpack-client.node.unbundled.development.js'); | ||
} |
7 changes: 7 additions & 0 deletions
7
packages/react-server-dom-webpack/npm/server.node.unbundled.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-server-dom-webpack-server.node.unbundled.production.min.js'); | ||
} else { | ||
module.exports = require('./cjs/react-server-dom-webpack-server.node.unbundled.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
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 |
---|---|---|
|
@@ -7,4 +7,4 @@ | |
* @flow | ||
*/ | ||
|
||
export * from '../src/ReactFlightDOMClientNode.js'; | ||
export * from './src/ReactFlightDOMServerNode'; |
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 |
---|---|---|
@@ -1,16 +1 @@ | ||
/** | ||
* 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. | ||
*/ | ||
|
||
// TODO: this is special because it gets imported during build. | ||
// | ||
// TODO: 18.0.0 has not been released to NPM; | ||
// It exists as a placeholder so that DevTools can support work tag changes between releases. | ||
// When we next publish a release, update the matching TODO in backend/renderer.js | ||
// TODO: This module is used both by the release scripts and to expose a version | ||
// at runtime. We should instead inject the version number as part of the build | ||
// process, and use the ReactVersions.js module as the single source of truth. | ||
export default '18.2.0'; | ||
export default '18.3.0-next-62178c5e3-20230219'; |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/** | ||
* 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'; | ||
|
||
module.exports = function dynamicImports() { | ||
return { | ||
name: 'scripts/rollup/plugins/dynamic-imports', | ||
renderDynamicImport({targetModuleId}) { | ||
if (targetModuleId === null) { | ||
return {left: 'import(', right: ')'}; | ||
} | ||
return null; | ||
}, | ||
}; | ||
}; |
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