-
Notifications
You must be signed in to change notification settings - Fork 47.5k
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
Move remaining things to named exports #18165
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 1bcfdef:
|
Details of bundled changes.Comparing: 739f20b...1bcfdef react-flight-dom-webpack
react-noop-renderer
react-reconciler
react-server
react-debug-tools
react-flight
Size changes (stable) |
Details of bundled changes.Comparing: 739f20b...1bcfdef react-flight-dom-webpack
react-noop-renderer
react-server
react-reconciler
react-flight
react-debug-tools
Size changes (experimental) |
const Rectangle = require('./npm/Rectangle'); | ||
|
||
module.exports = Rectangle; | ||
export {default} from './npm/Rectangle'; |
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.
How does this work? Aren’t they still CJS?
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.
Yea, for now. But once ART switches to ES modules we can switch the inner implementation too. This change doesn't do much since this file isn't actually built anyway. Just gets us one step closer.
0873114
to
a40d727
Compare
The interesting case here is the noop renderers. The wrappers around the reconciler now changed to use a local export that gets mutated. ReactNoop and ReactNoopPersistent now have to destructure the object to list out the names it's going to export. We should probably refactor ReactNoop away from createReactNoop. Especially since it's also not Flow typed.
This will have esModule compatibility flag on them. They should ideally export default instead.
6e794d3
to
1bcfdef
Compare
The interesting case here is the noop renderers. The wrappers around the reconciler now changed to use a local export that gets mutated.
ReactNoop and ReactNoopPersistent now have to destructure the object to list out the names it's going to export. We should probably refactor ReactNoop away from createReactNoop. Especially since it's also not Flow typed.