mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-28 06:53:42 +08:00
Each limitations partial held its whole text on one line (map-and-set.mdx was a single 1,080-character line), so any two edits to the same partial conflicted. The partials now put one sentence per line, with a bullet's continuation lines indented two spaces. Markdown joins the lines, so the rendered pages are unchanged. scripts/limitations-partials.mjs reads a labeled bullet's indented continuation lines as part of the bullet when it splits and joins the page, and AGENTS.md states the convention.
7 lines
487 B
Plaintext
7 lines
487 B
Plaintext
Node-API (N-API) and V8 `.node` addons depend on Node.js itself, so compiled programs can't load them.
|
|
Direct `createRequire` calls to local addons are rejected at compile time.
|
|
A package that requires an addon needs a JavaScript implementation that compiles, or a replacement through native FFI.
|
|
|
|
Use [Native FFI](/docs/ffi#replacing-a-node-api-addon) to call a plain C ABI function linked from an object or static archive.
|
|
The guide includes a replacement for a small Node-API helper.
|