-
Notifications
You must be signed in to change notification settings - Fork 47.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use single entry point for SSR via browser field #10362
Changes from 1 commit
5dd42d1
3667cab
c886c0c
b9de442
17a2856
e17b301
d5200b4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
'use strict'; | ||
|
||
if (process.env.NODE_ENV === 'production') { | ||
module.exports = require('./cjs/react-dom-server.production.min.js'); | ||
module.exports = require('./cjs/react-dom-server-node.production.min.js'); | ||
} else { | ||
module.exports = require('./cjs/react-dom-server.development.js'); | ||
module.exports = require('./cjs/react-dom-server-node.development.js'); | ||
} |
This file was deleted.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
* LICENSE file in the root directory of this source tree. An additional grant | ||
* of patent rights can be found in the PATENTS file in the same directory. | ||
* | ||
* @providesModule ReactDOMServerEntry | ||
* @providesModule ReactDOMServerBrowserEntry | ||
*/ | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could add shims that throw for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes that would be nice. |
||
'use strict'; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be nicer to do this with a more public browser entry point instead of the internal package details (personally I'd prefer not exposing those as separate files at all and just inline them).
With a public entry point it's at least possible to manually require the browser version if you need to. This encourages require to the internal implementation details instead.