diff --git a/package-lock.json b/package-lock.json index 399e6c8..6da42a4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4943,6 +4943,15 @@ "to-regex": "^3.0.1" } }, + "native-addon-loader": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/native-addon-loader/-/native-addon-loader-2.0.1.tgz", + "integrity": "sha512-tAaKULhDUmHYNZNKAWlvEky0x+y17+6jbtscXpf0WeWCPRP1nR2h3sA128rWRwj0YbpXVaPhPeJT0ejN7bJtyw==", + "dev": true, + "requires": { + "loader-utils": "^1.2.3" + } + }, "neo-async": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", @@ -4999,12 +5008,6 @@ } } }, - "node-loader": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/node-loader/-/node-loader-0.6.0.tgz", - "integrity": "sha1-x5fvUQle1YWZArFX9jhPY2HgWug=", - "dev": true - }, "node-releases": { "version": "1.1.43", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.43.tgz", diff --git a/package.json b/package.json index 95b7662..a042c2d 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "clean-webpack-plugin": "^3.0.0", "file-loader": "^5.0.2", "fork-ts-checker-webpack-plugin": "^3.1.1", - "node-loader": "^0.6.0", + "native-addon-loader": "^2.0.1", "typescript": "^3.7.4", "webpack": "^4.41.4", "webpack-cli": "^3.3.10" diff --git a/webpack.config.js b/webpack.config.js index bd95b31..caf35b0 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -32,7 +32,14 @@ module.exports = (env, argv) => { }, { test: /\.node/i, - use: [{ loader: "node-loader" }, { loader: "file-loader" }] + use: [ + { + loader: "native-addon-loader", + options: { + name: "[name]-[hash].[ext]" + } + } + ] } ] },