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
[Fresh] Set up infra for runtime and Babel plugin #15698
Conversation
Details of bundled changes.Comparing: 9c9ea94...4dbd247 react-fresh
Generated by 🚫 dangerJS |
const ReactFreshBabelPlugin = require('./src/ReactFreshBabelPlugin'); | ||
|
||
// This is hacky but makes it work with both Rollup and Jest. | ||
module.exports = ReactFreshBabelPlugin.default || ReactFreshBabelPlugin; |
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.
I thought new packages can use ES modules.
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.
I don't think we enabled ESM output for anything yet because of how DEV/PROD split is done.
* Add a stub for React Fresh Babel plugin package * Move ReactFresh-test into ReactFresh top level directory * Add a stub for React Fresh Runtime entry point * Extract Fresh runtime from tests into its entry point
* Add a stub for React Fresh Babel plugin package * Move ReactFresh-test into ReactFresh top level directory * Add a stub for React Fresh Runtime entry point * Extract Fresh runtime from tests into its entry point
react-fresh
top level package.react-fresh/babel
entry point.react-fresh/runtime
entry point.I want to keep it all in this repo so that I can write integration tests which run against latest React, and verify all pieces work together. This also makes it easier to ensure we actually fix this if we break it.
The next follow-up will be to actually write the Babel plugin, and add some kind of integration testing.