Skip to content

Commit 2de47ca

Browse files
committed
vfs: document that useVfs does not support ESM entry points
1 parent f6bc028 commit 2de47ca

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

doc/api/single-executable-applications.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,12 @@ When `useVfs` is enabled, `__filename` and `__dirname` in the injected main
234234
script reflect VFS paths (e.g., `/sea/main.js`) instead of
235235
[`process.execPath`][].
236236

237+
#### ESM limitations
238+
239+
The `useVfs` option does not currently support ESM entry points. Using
240+
`"useVfs": true` together with `"mainFormat": "module"` is not supported.
241+
The main script must use CommonJS (`require()`) when VFS is enabled.
242+
237243
#### Code caching limitations
238244

239245
The `useCodeCache` option in the SEA configuration does not currently apply to

0 commit comments

Comments
 (0)