Skip to content

Conversation

adamziel
Copy link
Collaborator

@adamziel adamziel commented Jul 14, 2025

Motivation for the change, related issues

#2317 introduced a dynamic import in a CJS code path (comlink-sync.ts). Node 20 requires a --experimental-vm-modules flag to run dynamic imports in such a context. This PR tries calling require() first to make it all work again.

Testing Instructions (or ideally a Blueprint)

Confirm the test-built-npm-packages test passed.

@adamziel adamziel added [Type] Bug An existing feature does not function as intended [Package][@wp-playground] CLI labels Jul 14, 2025
@adamziel adamziel marked this pull request as ready for review July 14, 2025 14:05
@adamziel adamziel changed the title Try require() before dynamic imprt in comlink-sync.ts [php-wasm/universal] Try require() before dynamic imprt in comlink-sync.ts Jul 14, 2025
@adamziel adamziel merged commit b943763 into trunk Jul 14, 2025
23 of 24 checks passed
@adamziel adamziel deleted the fix-test-built-npm-packages branch July 14, 2025 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package][@php-wasm] Universal [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant