-
Notifications
You must be signed in to change notification settings - Fork 85
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
feat: react hmr 支持匿名函数导出 #947
Conversation
提交前执行下 just ready,这样提上来的代码不会有 clippy 和 format 的问题。 |
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.
此外还需要做的两件事是:
1、在 transform.rs 里加入这个 visitor,基于 file.extname 和 file.is_under_node_modules 决定是否装载这个 visitor
2、在 e2e/fixtures 目录新增一个相应的用例
export default ()=>{
return <div>1</div>
} @JackGuiYang12 确认下这个会热更吗? 我看 umi 是加了这部分 的 case 的 |
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.
有疑问可以找我私聊 ,swc 和 babel 还是挺不一样的
好的👌 |
https://codesandbox.io/p/sandbox/hotreplacetest-kwdz7q?file=%2Fsrc%2Fcomponents%2FComponent1%2Findex.tsx%3A6%2C10 |
NO 你应该使用 mako 的 watch mode 来验证。 |
* chore: improve anonymize default export hmr * code style * chore: code style * code style
完成给react 组件默认导出赋默认值:更多内容请看:#931