Skip to content

Conversation

CPunisher
Copy link
Contributor

@CPunisher CPunisher commented Sep 3, 2025

Summary

  1. Add a postprocess hook where users can attach cdn queries to the url like request.url.searchParams.set("external", "react");
  2. Add ResolvedRequest to provide more information for the function options.

Checklist

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

@CPunisher CPunisher requested a review from ahabhgk September 3, 2025 08:17
Copy link

netlify bot commented Sep 3, 2025

Deploy Preview for rspack ready!

Name Link
🔨 Latest commit e5a6ac0
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/68be8d003d429a0008abf23a
😎 Deploy Preview https://deploy-preview-11571--rspack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@github-actions github-actions bot added team The issue/pr is created by the member of Rspack. release: feature release: feature related release(mr only) labels Sep 3, 2025
Copy link
Contributor

github-actions bot commented Sep 3, 2025

📦 Binary Size-limit

Comparing e5a6ac0 to perf: improve create hash (#11598) by harpsealjs

🙈 Size remains the same at 47.24MB

Copy link

codspeed-hq bot commented Sep 3, 2025

CodSpeed Performance Report

Merging #11571 will not alter performance

Comparing 09-03-feat/browser-http-import (e5a6ac0) with main (6e6aedf)

Summary

✅ 17 untouched benchmarks

@CPunisher CPunisher changed the title feat(browser): support more cdn options feat(browser): add postprocess and ResolvedRequest to BrowserHttpImportEsmPlugin Sep 8, 2025
@CPunisher CPunisher marked this pull request as ready for review September 8, 2025 10:46
@Copilot Copilot AI review requested due to automatic review settings September 8, 2025 10:46
@CPunisher CPunisher requested a review from hardfist as a code owner September 8, 2025 10:46
Copy link
Contributor

@Copilot 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 enhances the BrowserHttpImportEsmPlugin by adding a postprocessing hook and providing more detailed request information to plugin options. The changes enable users to attach CDN-specific query parameters and access comprehensive request context.

  • Add postprocess hook allowing users to modify the URL with CDN-specific parameters
  • Introduce ResolvedRequest and ProcessedRequest interfaces for better type safety and information access
  • Refactor function signatures to accept ResolvedRequest objects instead of separate parameters

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

@CPunisher CPunisher merged commit 12a6349 into main Sep 9, 2025
72 of 74 checks passed
@CPunisher CPunisher deleted the 09-03-feat/browser-http-import branch September 9, 2025 06:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release: feature release: feature related release(mr only) team The issue/pr is created by the member of Rspack.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants