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

Build: Polyfill __dirname in php-wam/node ESM via banner option #1591

Merged
merged 1 commit into from
Jul 9, 2024

Conversation

adamziel
Copy link
Collaborator

@adamziel adamziel commented Jul 9, 2024

Motivation for the change, related issues

Related to #1587

The recent changes to publish @php-wasm/node as ESM broke the .wasm files paths in the published package. Specifically, __dirname + '/php_8_0.wasm' became /home/runner/work/wordpress-playground/wordpress-playground/node_modules/@php-wasm/node/php_8_0.wasm which is undesirable.

This PR polyfills the __dirname variable with ESM-compliant alternatives in the ESM version of the @php-wasm/node package.

Testing instructions

  • Run npm run build
  • Confirm the built @php-wasm/node package has the correct .wasm files paths.
@adamziel adamziel self-assigned this Jul 9, 2024
@adamziel adamziel added [Type] Bug An existing feature does not function as intended [Type] Repo / Project Management labels Jul 9, 2024
@adamziel adamziel merged commit 0a1d4b2 into trunk Jul 9, 2024
4 checks passed
@adamziel adamziel deleted the polyfill-dirname-in-esm-via-bnaner branch July 9, 2024 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug An existing feature does not function as intended [Type] Repo / Project Management
1 participant