-
-
Notifications
You must be signed in to change notification settings - Fork 49.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
fix(radio): build site failed in webpack@4.44.0 #25821
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 218bd6b:
|
Codecov Report
@@ Coverage Diff @@
## master #25821 +/- ##
=======================================
Coverage 99.52% 99.52%
=======================================
Files 374 374
Lines 7299 7299
Branches 2030 1989 -41
=======================================
Hits 7264 7264
Misses 35 35
Continue to review full report at Codecov.
|
我也不知道为什么,凭直觉改的,感觉可能是这的问题 😂 |
RadioProps, | ||
RadioChangeEventTarget, | ||
RadioChangeEvent, | ||
} from './interface'; |
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.
原因是 webpack 4.44.0 不支持 export *
?
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.
感觉没啥道理啊,这块导出的不都是 typescript 的东西么?
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.
说实话,我也有点懵逼,感觉这样写和 export *
没区别。
我猜可能的原因是:export *
现在是不是也会把 默认导出 default
提出来(interface没有默认导出),导致当前模块的默认导出为空?
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.
如果这么说那就是 bug,es 的规范里这么做不会包含 default。你是怎么找到这块出错的?
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.
是的,规范里面明确说了 export *
不会包含 default
的。
找到这个还是有运气的成分,我查了 Minified React error #130
这个错误一般都是没有加 export
或 export default
造成的,扫了一遍其他地方都没有问题,然后就把 export *
这行删了,发现成功了。。。
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.
6 得飞起~
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.
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 had to extract and rebuild the Radio button from scratch 😢 |
[中文版模板 / Chinese template]
🤔 This is a ...
🔗 Related issue link
fix
Radio
build site failed inwebpack@4.40.0
💡 Background and solution
📝 Changelog
webpack@4.44.0
.webpack@4.44.0
下无法使用的问题。☑️ Self Check before Merge