feat: 支持依赖包里的 CSS 与字体(含 pnpm 的 .pnpm 布局) - #13
Merged
Merged
Conversation
ikenxuan
commented
Sep 16, 2026
Contributor
- CSS url() 的 / 开头引用按「CSS 同级目录(构建产物)→ assetsDir」依次解析, 依赖包带进来的字体(Vite 输出成 /assets/*)不再在 file:// 截图页静默回退
- CSS 资源改按 assetsInlineLimit 落地:小文件内联为 data URI,大字体转 file://, 不再无条件 base64 进每一份 HTML;顺带处理百分号编码文件名与目录引用
- dir.cssEntry / extraStylePaths 支持直接写包名,走 Node 解析(exports 映射、 pnpm 的 .pnpm 真实路径),不再依赖硬拼 node_modules/<包名>
- createTemplateRenderer 透传 config.extraStylePaths(此前该项在约定流程里静默失效)
- 独立运行包强制内联 CSS 资源:CSS 文本构建期烘死,file:// 绝对路径换机器即失效
- CSS url() 的 / 开头引用按「CSS 同级目录(构建产物)→ assetsDir」依次解析, 依赖包带进来的字体(Vite 输出成 /assets/*)不再在 file:// 截图页静默回退 - CSS 资源改按 assetsInlineLimit 落地:小文件内联为 data URI,大字体转 file://, 不再无条件 base64 进每一份 HTML;顺带处理百分号编码文件名与目录引用 - dir.cssEntry / extraStylePaths 支持直接写包名,走 Node 解析(exports 映射、 pnpm 的 .pnpm 真实路径),不再依赖硬拼 node_modules/<包名> - createTemplateRenderer 透传 config.extraStylePaths(此前该项在约定流程里静默失效) - 独立运行包强制内联 CSS 资源:CSS 文本构建期烘死,file:// 绝对路径换机器即失效
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 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 |
commit: |
ikenxuan
marked this pull request as ready for review
September 16, 2026 05:35
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.