Skip to content

feat: add option to disable asset prefix in manifest#6681

Merged
chenjiahan merged 5 commits intomainfrom
manifest_prefix_1202
Dec 2, 2025
Merged

feat: add option to disable asset prefix in manifest#6681
chenjiahan merged 5 commits intomainfrom
manifest_prefix_1202

Conversation

@chenjiahan
Copy link
Copy Markdown
Member

Summary

Add a new prefix option to the output.manifest configuration to control whether asset URLs should include the static asset prefix.

This allows more flexibility in manifest generation for different deployment scenarios.

Checklist

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

Copilot AI review requested due to automatic review settings December 2, 2025 10:39
@netlify
Copy link
Copy Markdown

netlify bot commented Dec 2, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit 38e2d75
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/692ec5362a71c00008e31bb6
😎 Deploy Preview https://deploy-preview-6681--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: 62 (🟢 up 6 from production)
Accessibility: 100 (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.

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

Copy link
Copy Markdown
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 adds a new prefix option to the output.manifest configuration, allowing developers to control whether asset URLs in the generated manifest file should include the static asset prefix (dev.assetPrefix / output.assetPrefix).

Key Changes:

  • Added prefix boolean option to ManifestObjectConfig type with a default value of true
  • Updated manifest generation logic to conditionally apply asset prefixes based on the new option
  • Added test coverage for the new feature with prefix: false

Reviewed changes

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

Show a summary per file
File Description
packages/core/src/types/config.ts Added the prefix configuration option to the ManifestObjectConfig type with appropriate JSDoc documentation
packages/core/src/plugins/manifest.ts Implemented prefix control logic in manifest generation, including type updates, normalization, and conditional asset URL prefix application
e2e/cases/manifest/remove-prefix/src/index.js Test fixture entry point that imports React and CSS for testing prefix removal
e2e/cases/manifest/remove-prefix/src/index.css Test fixture CSS file
e2e/cases/manifest/remove-prefix/index.test.ts E2E test verifying manifest generation without asset prefix when prefix: false is configured

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@chenjiahan chenjiahan merged commit bd49579 into main Dec 2, 2025
11 checks passed
@chenjiahan chenjiahan deleted the manifest_prefix_1202 branch December 2, 2025 11:03
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.

2 participants