Skip to content

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

Merged
SoonIter merged 3 commits intomainfrom
webpack-runtime
Nov 21, 2024
Merged

fix(plugin-assets-retry): avoid __webpack_require__.e pollution and add some try catch to be safer#4025
SoonIter merged 3 commits intomainfrom
webpack-runtime

Conversation

@SoonIter
Copy link
Copy Markdown
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).

@netlify
Copy link
Copy Markdown

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
@SoonIter SoonIter requested a review from chenjiahan November 21, 2024 07:08
@chenjiahan chenjiahan requested a review from 9aoy November 21, 2024 07:33
@SoonIter SoonIter merged commit 350076c into main Nov 21, 2024
@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