Skip to content

Remove flags, always use null-safe getExports and prefer Meta runtime#297

Merged
schwartzmx merged 1 commit into
facebook:mainfrom
schwartzmx:rm-webpack-metaflag
May 4, 2026
Merged

Remove flags, always use null-safe getExports and prefer Meta runtime#297
schwartzmx merged 1 commit into
facebook:mainfrom
schwartzmx:rm-webpack-metaflag

Conversation

@schwartzmx

Copy link
Copy Markdown
Member

Remove safeWebpackModuleExports and preferMetaModuleRuntime flags in favor of unconditionally applying both fixes:

  • getExports always uses null-safe access (wexports[0]?.exports ?? null)
  • IIFE checks Meta __debug runtime before webpack_module_cache since Meta's module system is authoritative in Meta's environment

Reverts to the simpler IIFE pattern per reviewer feedback.

Remove safeWebpackModuleExports and preferMetaModuleRuntime flags in
favor of unconditionally applying both fixes:

- getExports always uses null-safe access (wexports[0]?.exports ?? null)
- IIFE checks Meta __debug runtime before __webpack_module_cache__ since
  Meta's module system is authoritative in Meta's environment

Reverts to the simpler IIFE pattern per reviewer feedback.
@schwartzmx schwartzmx requested a review from reshadi April 27, 2026 21:13
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 27, 2026
@schwartzmx schwartzmx merged commit f6bb4eb into facebook:main May 4, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants