Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(plugin-assets-retry): avoid __webpack_require__.e pollution and add some try catch to be safer #4025

Merged
merged 3 commits into from
Nov 21, 2024

Conversation

SoonIter
Copy link
Member

@SoonIter SoonIter commented Nov 20, 2024

Summary

if apps use preload, __webpack_require__.e would have other arguments fetchPriority, that would cause the error

img_v3_02gr_f9b96642-8ffb-48e1-ba46-d83d7d37763g

https://github.com/web-infra-dev/rspack/blob/530a068b9fa461da27b07e5a1fa3ca94f296d7b0/crates/rspack_plugin_runtime/src/runtime_module/runtime/ensure_chunk.js#L4

  1. add args placeholder to avoid other runtime code overrides the __webpack_require__.e with some args
  2. add some try catch logic to make safer

Related Links

Checklist

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

Copy link

netlify bot commented Nov 20, 2024

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit 4c88928
🔍 Latest deploy log https://app.netlify.com/sites/rsbuild/deploys/673ed0d79f654200080adbdc
😎 Deploy Preview https://deploy-preview-4025--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: 72 (🔴 down 1 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 site configuration.

@SoonIter SoonIter marked this pull request as ready for review November 21, 2024 06:51
@SoonIter SoonIter changed the title fix(plugin-assets-retry): avoid __webpack_require__.e pollution fix(plugin-assets-retry): avoid __webpack_require__.e pollution and add some try catch to be safer Nov 21, 2024
@chenjiahan chenjiahan requested a review from 9aoy November 21, 2024 07:33
@SoonIter SoonIter merged commit 350076c into main Nov 21, 2024
13 of 14 checks passed
@SoonIter SoonIter deleted the webpack-runtime branch November 21, 2024 07:51
@9aoy 9aoy mentioned this pull request Nov 25, 2024
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