Skip to content

Commit adc9ad8

Browse files
committed
fix(js): Fixed import of addon
1 parent 3dc9a5b commit adc9ad8

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

src/index.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,13 @@
1-
import path from 'path';
21
import { EventEmitter } from 'node:events';
32

4-
import binary from '@mapbox/node-pre-gyp';
5-
63
import { Addon } from './types';
74

85
const SUPPORTED_PLATFORMS = ['win32'];
96

107
let addon: Addon | null = null;
118

129
if (SUPPORTED_PLATFORMS.includes(process.platform)) {
13-
const bindingPath = binary.find(
14-
path.resolve(path.join(__dirname, '..', 'package.json'))
15-
);
16-
addon = require(bindingPath); // eslint-disable-line import/no-dynamic-require
10+
addon = require('../build/Release/PaymoWinShutdownHandler.node'); // eslint-disable-line import/no-dynamic-require
1711
}
1812

1913
class ElectronShutdownHandlerClass extends EventEmitter {

typings/@mapbox__node-pre-gyp/index.d.ts

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)