We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
React 的 Fast Refresh 热更功能对于匿名函数是不生效的,所以需要自动为响应的匿名函数增加命名。
1、如果 #923 没有合并,提 pr 到 refact/build,否则提 pr 到 master 2、在 crates/mako/src/visitors 下新增 hmr_default_rename.rs,功能实现参考 https://github.com/umijs/umi/blob/master/packages/preset-umi/src/features/hmrGuardian/babelPlugin.ts
比如。
export default function() {} ↓ ↓ ↓ ↓ ↓ export default function ComponentB() {}
参考: https://github.com/umijs/umi/tree/master/packages/preset-umi/src/features/hmrGuardian
The text was updated successfully, but these errors were encountered:
JackGuiYang12
No branches or pull requests
背景
React 的 Fast Refresh 热更功能对于匿名函数是不生效的,所以需要自动为响应的匿名函数增加命名。
实现
1、如果 #923 没有合并,提 pr 到 refact/build,否则提 pr 到 master
2、在 crates/mako/src/visitors 下新增 hmr_default_rename.rs,功能实现参考 https://github.com/umijs/umi/blob/master/packages/preset-umi/src/features/hmrGuardian/babelPlugin.ts
比如。
参考:
https://github.com/umijs/umi/tree/master/packages/preset-umi/src/features/hmrGuardian
The text was updated successfully, but these errors were encountered: