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

Temporarily disable ESM engine resolution when using the standalone binary #525

Merged
merged 6 commits into from
Jun 19, 2023

Conversation

yhatt
Copy link
Member

@yhatt yhatt commented Jun 19, 2023

Marp CLI is using Vercel's pkg to build standalone binaries. However, it still cannot use ESM resolution via import(). Marp CLI v3.0.0 has supported ESM engine, but the standalone binary has been reported failing execution when trying to resolve an integrated Marp Core via import() due to lacked ESM support of pkg.

Not only pkg, alternative ways to make a binary also not supported ESM for now: nexe, the single executable application (Node.js 20))

So we currently have to disable ESM resolution in the binary packaged by pkg, and must revert to the same way as v2 (using import-from). If tried to resolve ESM in the standalone binary, Marp CLI fails with outputting more clear error message.

Close #524 for now.

ToDo

  • Update tests
  • Update README

@yhatt yhatt changed the title Disable ESM engine resolution if using the standalone binary Temporary disable ESM engine resolution if using the standalone binary Jun 19, 2023
@yhatt yhatt changed the title Temporary disable ESM engine resolution if using the standalone binary Temporarily disable ESM engine resolution of using the standalone binary Jun 19, 2023
@yhatt yhatt changed the title Temporarily disable ESM engine resolution of using the standalone binary Temporarily disable ESM engine resolution when using the standalone binary Jun 19, 2023
@yhatt yhatt merged commit 5db93e4 into main Jun 19, 2023
1 check passed
@yhatt yhatt deleted the disable-esm-resolution-in-pkg-binary branch June 19, 2023 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Marp CLI 3.0.0 standalone binary is missing setup-sandbox.js
1 participant