Repository navigation
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Style transformation and compiler output packages/compiler-ssr/src/index.ts, packages/compiler-ssr/src/transforms/ssrTransformElement.ts, packages/compiler-ssr/__tests__/ssrComponent.spec.ts, packages/compiler-ssr/__tests__/ssrElement.spec.ts, packages/compiler-ssr/__tests__/ssrFallthroughAttrs.spec.ts |
The SSR compiler transforms static style attributes and combines them with dynamic styles and bound props. Compiler snapshots cover serialization, escaping, style merging, component styles, and fallthrough attributes. |
Server-rendered style output packages/server-renderer/__tests__/render.spec.ts, packages/server-renderer/__tests__/ssrAttrFallthrough.spec.ts |
Server-renderer tests cover static and dynamic style output, style ordering, v-show, components, SVG, and style fallthrough. |
Priority:
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Other
Suggested labels: :cake: p2-nice-to-have
Suggested reviewers: sxzz
Merge Risk: 
Minimal · up to 700ce
-
Merge Risk: ⚪ Minimal · up to
700ceNo merge-blocking issue is established; the change is ready for normal checks.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed -
Finishing Touches: 💡 1
-
🛠️ Fix failing CI checks: 💡
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
@vue/compiler-core
@vue/compiler-dom
@vue/compiler-sfc
@vue/compiler-ssr
@vue/reactivity
@vue/runtime-core
@vue/runtime-dom
@vue/server-renderer
@vue/shared
vue
@vue/compat
commit: |
Size ReportBundles
Usages
|
I was profiling what was taking time on rendering SSR for nuxt, and noticed in the fixture I was using that a plain
style="color: red"attribute got rendered at runtime on every request because it becomes a constant dynamic binding and we then compile that to be rendered withssrRenderStylethis PR instead renders static
styleattributes on plain elements directly into the open tag at compile time, which significantly speeds up rendering static styles...v-for, with an interpolationsmall benchmark script
to get those numbers, build
compiler-ssr(node scripts/build.js compiler-ssr -f cjs) onmainand on this branch, copyingpackages/compiler-ssr/dist/compiler-ssr.cjs.jstobefore.cjs.jsandafter.cjs.jsin the same folder, build the rest withnode scripts/build.js shared reactivity runtime-core runtime-dom compiler-core compiler-dom server-renderer vue -f cjs, then runNODE_ENV=production node bench.cjs .Summary by CodeRabbit
!important, and HTML-sensitive characters.