Skip to content

docs: clarify scriptLoading behavior for existing script tags#6358

Merged
chenjiahan merged 2 commits intomainfrom
script_loading_behavior_1014
Oct 14, 2025
Merged

docs: clarify scriptLoading behavior for existing script tags#6358
chenjiahan merged 2 commits intomainfrom
script_loading_behavior_1014

Conversation

@chenjiahan
Copy link
Member

Summary

  • Explain that scriptLoading option only affects Rsbuild-generated script tags, not existing ones in HTML template or added via html.tags/modifyHtmlTags.
  • Add test cases to verify this behavior.

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings October 14, 2025 13:35
@netlify
Copy link

netlify bot commented Oct 14, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit a2f2bc9
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/68ee52e6179d3600072946ea
😎 Deploy Preview https://deploy-preview-6358--rsbuild.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 70 (🟢 up 8 from production)
Accessibility: 97 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR clarifies the behavior of the scriptLoading configuration option in Rsbuild documentation by explicitly stating it only affects automatically generated script tags, not existing ones in HTML templates or those added via configuration APIs.

  • Added documentation sections explaining the scope limitations of scriptLoading
  • Created test cases to verify that existing script tags remain unchanged
  • Added tests for both HTML template scripts and html.tags configured scripts

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
website/docs/en/config/html/script-loading.mdx Added English documentation clarifying scriptLoading scope limitations
website/docs/zh/config/html/script-loading.mdx Added Chinese documentation clarifying scriptLoading scope limitations
e2e/cases/html/script-loading/src/index.html Created HTML template with existing script tag for testing
e2e/cases/html/script-loading/index.test.ts Added test cases verifying scriptLoading behavior with existing scripts

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@chenjiahan chenjiahan merged commit 5b75750 into main Oct 14, 2025
11 checks passed
@chenjiahan chenjiahan deleted the script_loading_behavior_1014 branch October 14, 2025 13:51
@chenjiahan chenjiahan mentioned this pull request Oct 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant