chore: remove duplicated preview-theme.css (keep single bundled source) - #22
Merged
Merged
Conversation
## 变更内容 - preview-theme.css 此前被双重加载:index.html <link>(public/ 副本)+ main.js import(src/design-system/ 副本),两份内容完全相同(约 36KB) - 删除 index.html 的 <link> 与 public/preview-theme.css,仅保留 main.js 的打包引入 - 生产构建中该 CSS 由 Vite 以 <link> 注入 <head>,加载顺序与注入时机不变;开发态不再有双份规则 ## 验证 - [x] npx vite build 通过(1.66s) - [x] npx vitest run 88/88 全部通过
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.
变更内容
preview-theme.css此前被双重加载:index.html的<link href="./preview-theme.css">(指向 public/ 副本)main.js的import "./design-system/preview-theme.css"(src/design-system/ 副本)两份内容完全相同(约 36KB / 1221 行)。本 PR 删除 index.html 的
<link>与public/preview-theme.css,仅保留 main.js 的打包引入作为唯一来源。生产构建中该 CSS 由 Vite 打包后以
<link>注入<head>,注入时机与样式级联顺序均不变;开发态消除双份规则。验证
npx vite build通过(1.66s)npx vitest run88/88 全部通过