Skip to content

Conversation

@LingyuCoder
Copy link
Contributor

Summary

The esm and jsdom has different context and self["webpackChunk"] will be different instances that leads to chunk loading failure. So just share an array between these two vm context to make sure the loaded chunk can be found.

Related links

Checklist

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

Copilot AI review requested due to automatic review settings November 10, 2025 09:34
@netlify
Copy link

netlify bot commented Nov 10, 2025

Deploy Preview for rspack ready!

Name Link
🔨 Latest commit e90c868
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/6911b19fda18fb0008bb46c9
😎 Deploy Preview https://deploy-preview-12141--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 the team The issue/pr is created by the member of Rspack. label Nov 10, 2025
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 enables the prefetch-preload-module-jsonp test that was previously disabled due to jsdom compatibility issues. The fix adds support for sharing the webpackChunk global variable across test modules in the jsdom environment.

  • Removes the test filter that was skipping the prefetch/preload test due to jsdom issues
  • Adds webpackChunk to the global shared context proxy to enable proper chunk loading in tests

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
tests/rspack-test/configCases/web/prefetch-preload-module-jsonp/test.filter.js Removes the test filter to enable the previously skipped test
packages/rspack-test-tools/src/runner/web/index.ts Adds webpackChunk property handling in the proxy getter and setter to share state across test modules

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

@github-actions
Copy link
Contributor

📦 Binary Size-limit

Comparing e90c868 to fix: use real resource when export from external (#12136) by Fy

🙈 Size remains the same at 48.08MB

@codspeed-hq
Copy link

codspeed-hq bot commented Nov 10, 2025

CodSpeed Performance Report

Merging #12141 will not alter performance

Comparing test/share-webpack-chunk (e90c868) with main (ae75bb5)

Summary

✅ 17 untouched

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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