You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,11 @@
2
2
3
3
## [Unreleased]
4
4
5
+
### Change
6
+
7
+
- Adopt [Node.js SEA](https://nodejs.org/api/single-executable-applications.html) for building the standalone binary ([#568](https://github.com/marp-team/marp-cli/issues/568), [#731](https://github.com/marp-team/marp-cli/pull/731))
8
+
- Now the standalone binary allows using ES Modules and `import()` in the engine and configuration file
Copy file name to clipboardExpand all lines: README.md
+1-9Lines changed: 1 addition & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -518,7 +518,7 @@ The functional engine should export a function as the default export, which shou
518
518
The function must return a class that inherits from Marpit, or an instance of a Marpit-based engine created with the constructor options passed as an argument.
> Currently ES Modules can resolve only when using Marp CLI via Node.js. [The standalone binary](#standalone-binary) cannot resolve ESM. ([vercel/pkg#1291](https://github.com/vercel/pkg/issues/1291))
560
-
561
557
#### `marp` getter property
562
558
563
559
Marp CLI also exposes `marp` getter property to the parameter. It returns a prepared instance of the built-in Marp Core engine, so you can apply several customizations to Marp engine with simple declarations.
@@ -651,10 +647,6 @@ By default we use configuration file that is placed on current directory, but yo
651
647
652
648
If you want to prevent looking up a configuration file, you can pass `--no-config-file` (`--no-config`) option.
653
649
654
-
> [!WARNING]
655
-
>
656
-
> Currently ES Modules can resolve only when using Marp CLI via Node.js. [The standalone binary](#standalone-binary) cannot resolve ESM. ([vercel/pkg#1291](https://github.com/vercel/pkg/issues/1291))
// Show reason why `require()` failed in the current context
478
-
if(isStandaloneBinary()){
479
-
cliError(
480
-
'A standalone binary version of Marp CLI is currently not supported resolving ESM. Please consider using CommonJS, or trying to use Marp CLI via Node.js.'
// Show reason why `require()` failed in the current context
212
-
if(isStandaloneBinary()){
213
-
error(
214
-
'A standalone binary version of Marp CLI is currently not supported resolving ESM. Please consider using CommonJS, or trying to use Marp CLI via Node.js.'
215
-
)
216
-
}
217
-
}
218
-
returnnull// Jest allows importing ESM via `require()` so this line cannot measure coverage.
219
-
}
220
-
/* c8 ignore stop */
221
-
}
222
-
223
173
// NOTE: It cannot test because of overriding `require` in Jest context.
0 commit comments