-
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.
[Fizz] Move /static build into /server builds (#27327)
This joins the static (prerender) builds with the server builds but doesn't change the public entry points. The idea of two separate bundles is that we'd have a specialized build for Fizz just for the prerender that could do a lot more. However, in practice the code is implemented with a dynamic check so it's in both. It's also not a lot of code. At the same time if you do have a set up that includes both the prerender and the render in the same build output, this just doubles the server bundle size for no reason. So we might as well merge them into one build. However, I don't expose the `prerender` from `/server`. Instead it's just exposed from the public `/static` entry point. This leaves us with the option to go back to separate builds later if it diverges more in the future.
- Loading branch information
1 parent
3cc8a93
commit 2c2bdd0
Showing
10 changed files
with
24 additions
and
39 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 |
---|---|---|
@@ -1,7 +1,11 @@ | ||
'use strict'; | ||
|
||
var s; | ||
if (process.env.NODE_ENV === 'production') { | ||
module.exports = require('./cjs/react-dom-static.browser.production.min.js'); | ||
s = require('./cjs/react-dom-server.browser.production.min.js'); | ||
} else { | ||
module.exports = require('./cjs/react-dom-static.browser.development.js'); | ||
s = require('./cjs/react-dom-server.browser.development.js'); | ||
} | ||
|
||
exports.version = s.version; | ||
exports.prerender = s.prerender; |
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,7 +1,11 @@ | ||
'use strict'; | ||
|
||
var s; | ||
if (process.env.NODE_ENV === 'production') { | ||
module.exports = require('./cjs/react-dom-static.edge.production.min.js'); | ||
s = require('./cjs/react-dom-server.edge.production.min.js'); | ||
} else { | ||
module.exports = require('./cjs/react-dom-static.edge.development.js'); | ||
s = require('./cjs/react-dom-server.edge.development.js'); | ||
} | ||
|
||
exports.version = s.version; | ||
exports.prerender = s.prerender; |
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,7 +1,11 @@ | ||
'use strict'; | ||
|
||
var s; | ||
if (process.env.NODE_ENV === 'production') { | ||
module.exports = require('./cjs/react-dom-static.node.production.min.js'); | ||
s = require('./cjs/react-dom-server.node.production.min.js'); | ||
} else { | ||
module.exports = require('./cjs/react-dom-static.node.development.js'); | ||
s = require('./cjs/react-dom-server.node.development.js'); | ||
} | ||
|
||
exports.version = s.version; | ||
exports.prerenderToNodeStream = s.prerenderToNodeStream; |
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 |
---|---|---|
|
@@ -8,3 +8,4 @@ | |
*/ | ||
|
||
export * from './ReactDOMFizzServerBrowser.js'; | ||
export {prerender} from './ReactDOMFizzStaticBrowser.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 |
---|---|---|
|
@@ -8,3 +8,4 @@ | |
*/ | ||
|
||
export * from './ReactDOMFizzServerEdge.js'; | ||
export {prerender} from './ReactDOMFizzStaticEdge.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
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