Create wrapper index.js for Node.js library
This commit is contained in:
parent
a38b0ac078
commit
f3a3299d02
|
@ -0,0 +1,3 @@
|
|||
// This wrapper file exists to allow importing from ESM contexts, as Node.js does not allow importing ".node" modules directly from ESM.
|
||||
|
||||
module.exports = require("./index.node");
|
|
@ -2,9 +2,9 @@ const fs = require("fs");
|
|||
|
||||
const common = {
|
||||
version: "0.8.0",
|
||||
main: "index.node",
|
||||
main: "index.js",
|
||||
types: "index.d.ts",
|
||||
files: ["cli.js", "postinstall.js", "index.d.ts"],
|
||||
files: ["cli.js", "postinstall.js", "index.d.ts", "index.js"],
|
||||
scripts: {
|
||||
build: "node-gyp build && shx mv build/Release/index.node index.node",
|
||||
clean:
|
||||
|
|
Loading…
Reference in New Issue