element-plus
element-plus copied to clipboard
refactor: buildProps
This PR brings the following:
as constis no longer needed when calling buildProps- Stricter type checking for the
propsparameter of buildProps. Have a look at this test case for details. - Simplify the return type of buildProps, which improves type hints in IDEs. Check out
tooltip.vue.d.tsbefore and after to get a rough sense of what’s changed. - Upgrade esbuild to support const modifier for type parameters.
Size Change: +87.7 kB (+6.07%) 🔍
Total Size: 1.53 MB
| Filename | Size | Change | |
|---|---|---|---|
./dist/element-plus/dist/index.full.js |
452 kB | +43.6 kB (+10.66%) | ⚠️ |
./dist/element-plus/dist/index.full.min.js |
299 kB | +814 B (+0.27%) | |
./dist/element-plus/dist/index.full.min.mjs |
294 kB | +773 B (+0.26%) | |
./dist/element-plus/dist/index.full.mjs |
443 kB | +42.5 kB (+10.62%) | ⚠️ |
ℹ️ View Unchanged
| Filename | Size |
|---|---|
./dist/element-plus/dist/index.css |
45.4 kB |
🧪 Playground Preview: https://element-plus.run/?pr=20211 Please comment the example via this playground if needed.
Why did the result of the building increase by 40+k? 🤔
Basically because esbuild changed how it preserves line breaks and comments when minification isn’t enabled. Please have a look at the diff of index.full.js.
There is a code conflict.
