-
-
Notifications
You must be signed in to change notification settings - Fork 48.9k
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
refactor: 📦 Generate version.js from package.json #23957
Conversation
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.
Could you please add tests to make sure this change works as expected?
我当初以为 #22644 (comment) 这样可以解决。 |
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 0857c05:
|
我试试看这个方法... |
require 和 import 这样用没什么本质区别。 |
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 bd3b9b7:
|
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 eee1848:
|
- 302.54kB
+ 299.68kB 少了 2.8kB。 |
Codecov Report
@@ Coverage Diff @@
## master #23957 +/- ##
=======================================
Coverage 98.77% 98.77%
=======================================
Files 364 364
Lines 7270 7270
Branches 1976 2014 +38
=======================================
Hits 7181 7181
Misses 89 89 Continue to review full report at Codecov.
|
|
是的。 |
@@ -277,7 +277,7 @@ | |||
"bundlesize": [ | |||
{ | |||
"path": "./dist/antd.min.js", | |||
"maxSize": "305 kB" | |||
"maxSize": "300 kB" |
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.
回到 300 kB 了。
|
#22644,为了兼容webpack@5 改掉的 |
🤔 This is a ...
🔗 Related issue link
#22698
💡 Background and solution
package.json 本身有一点体积,单独生成 version,可以降低一点包大小。
📝 Changelog
package.json
from source code.package.json
从而优化了一点包体积。☑️ Self Check before Merge