[BF-023] 重型依赖按需加载和 route-level code splitting - #82
Merged
Conversation
Deploying byteflow with
|
| Latest commit: |
ea1070a
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://980010d3.byteflow-c58.pages.dev |
| Branch Preview URL: | https://perf-bf-023-heavy-deps-code.byteflow-c58.pages.dev |
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.
Issue
Closes #43
Scope
isomorphic-dompurifyfrom runtime dependencies sojsdom/cssstyledo not enter production analysis/prerender chunks.Implementation
isomorphic-dompurifyto directdompurify.src/core/security/markdown-sanitize-schema.tsand updated the Markdown preview renderer to import the schema from that renderer-only module.check:bundle-boundariesto block runtime imports ofisomorphic-dompurifyandjsdom, and keep DOMPurify isolated to the shared sanitizer.isomorphic-dompurifyorrehype-sanitize.Acceptance Criteria
npm run check:bundle-boundaries通过。npm run build通过。Validation
npm run lint- passed.npm run test- passed, 217 files / 1088 tests.npm run validate- passed.npm run build- passed, 1289 static pages.npm run test:e2e:smoke- passed.npm run analyze- passed; analyzer reports generated at.next/analyze/client.html,.next/analyze/nodejs.html,.next/analyze/edge.html. Existing analyzer warnings for server chunks 5980.js/55.js remain non-blocking.npm run check:bundle-boundaries- passed.Bundle Evidence
out/index.html: 8 initial scripts, heavy dependency hits: none.out/en.html: 16 initial scripts, heavy dependency hits: none.out/en/all-tools.html: 17 initial scripts, heavy dependency hits: none.monaco-editor,@monaco-editor,react-markdown,pdf-lib,qrcode,isomorphic-dompurify,jsdom,cssstyle,browser/default-stylesheet.npm run analyzeno longer fails while prerendering/en/svg-optimizer; reports generated successfully.Manual Checks
Privacy Check
Screenshots / Evidence