-
Notifications
You must be signed in to change notification settings - Fork 46.9k
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
8214f57
commit af0c5a3
Showing
13 changed files
with
85 additions
and
76 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 |
---|---|---|
|
@@ -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
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
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