-
Notifications
You must be signed in to change notification settings - Fork 47.2k
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
[Flight] Rename react-transport-... packages to react-server-... #20403
Changes from all commits
d58e53e
6747c86
bc9bb91
265bc28
9c3bfe2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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.production.min.js'); | ||
} else { | ||
module.exports = require('./cjs/react-server-dom-webpack.development.js'); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
'use strict'; | ||
|
||
module.exports = require('./cjs/react-server-dom-webpack-node-register.js'); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
'use strict'; | ||
|
||
module.exports = require('./cjs/react-server-dom-webpack-plugin.js'); |
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-writer.browser.server.production.min.js'); | ||
} else { | ||
module.exports = require('./cjs/react-server-dom-webpack-writer.browser.server.development.js'); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
'use strict'; | ||
|
||
throw new Error( | ||
'The React Server Writer cannot be used outside a react-server environment. ' + | ||
'You must configure Node.js using the `--conditions react-server` flag.' | ||
); |
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-writer.node.server.production.min.js'); | ||
} else { | ||
module.exports = require('./cjs/react-server-dom-webpack-writer.node.server.development.js'); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "react-transport-dom-webpack", | ||
"description": "React Transport bindings for DOM using Webpack. This is intended to be integrated into meta-frameworks. It is not intended to be imported directly.", | ||
"name": "react-server-dom-webpack", | ||
"description": "React Server Components bindings for DOM using Webpack. This is intended to be integrated into meta-frameworks. It is not intended to be imported directly.", | ||
"version": "0.1.0", | ||
"private": true, | ||
"keywords": [ | ||
|
@@ -14,9 +14,9 @@ | |
"README.md", | ||
"index.js", | ||
"plugin.js", | ||
"server.js", | ||
"server.browser.js", | ||
"server.node.js", | ||
"writer.js", | ||
"writer.browser.server.js", | ||
"writer.node.server.js", | ||
"node-register.js", | ||
"cjs/", | ||
"umd/", | ||
|
@@ -25,21 +25,27 @@ | |
"exports": { | ||
".": "./index.js", | ||
"./plugin": "./plugin.js", | ||
"./server": "./server.js", | ||
"./server.browser": "./server.browser.js", | ||
"./server.node": "./server.node.js", | ||
"./node-loader": "./esm/react-transport-dom-webpack-node-loader.js", | ||
"./writer": { | ||
"react-server": { | ||
"node": "./writer.node.server.js", | ||
"browser": "./writer.browser.server.js" | ||
}, | ||
"default": "./writer.js" | ||
}, | ||
"./writer.node.server": "./writer.node.server.js", | ||
"./writer.browser.server": "./writer.browser.server.js", | ||
"./node-loader": "./esm/react-server-dom-webpack-node-loader.js", | ||
"./node-register": "./node-register.js", | ||
"./package.json": "./package.json" | ||
}, | ||
"browser": { | ||
"./server.js": "./server.browser.js" | ||
"./writer.js": "./writer.browser.server.js" | ||
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. What’s up with this change? 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. I guess this is still a server even in the browser. So was the extension missing before? 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. ah I see
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. It’s weird that this convention wins and have to be one the end. It’s also weird that since this reexports, the reexport is considered a hybrid. That just works because it doesn’t have dependencies on other server files. We probably should change our CJS build output convention to include server at the end. |
||
}, | ||
"main": "index.js", | ||
"repository": { | ||
"type" : "git", | ||
"url" : "https://github.com/facebook/react.git", | ||
"directory": "packages/react-transport-dom-webpack" | ||
"directory": "packages/react-server-dom-webpack" | ||
}, | ||
"engines": { | ||
"node": ">=0.10.0" | ||
|
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.
Should we start getting rid of the codename in source? It’s already being referred to in some places which risks confusion.
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.
These are internal FB names. I think I’ve changed the external ones.
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.
Yeah but I mean people read the source too. If we don't need the codename we could just remove it everywhere.