Skip to content

Commit 14e9c5e

Browse files
committed
fix: use import for loading the addon
1 parent faded66 commit 14e9c5e

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

lib/load-addon.js

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/load-addon.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/load-addon.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,5 @@ function findAddon(): any | undefined {
5757
return addon
5858
}
5959

60-
module.exports = findAddon()
60+
const addon = findAddon()
61+
export default addon

src/native.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
/* eslint-disable @typescript-eslint/no-var-requires */
22

33
/* Declare all native C++ classes and methods in this file. */
4-
module.exports = require("./load-addon")
4+
import addon from "./load-addon"
5+
module.exports = addon
56

67
/**
78
* The version of the ØMQ library the bindings were built with. Formatted as

0 commit comments

Comments
 (0)