From 655079741a567b4abfe45e9a00b6fb6696fe5d74 Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Fri, 25 Jun 2021 19:42:07 +0200 Subject: [PATCH] exclude ssh native deps from build --- terminus-ssh/webpack.config.js | 9 +++++---- webpack.plugin.config.js | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/terminus-ssh/webpack.config.js b/terminus-ssh/webpack.config.js index 9519fcd5..e89594b6 100644 --- a/terminus-ssh/webpack.config.js +++ b/terminus-ssh/webpack.config.js @@ -2,8 +2,9 @@ const config = require('../webpack.plugin.config') module.exports = config({ name: 'ssh', dirname: __dirname, - externals: [ - './crypto/build/Release/sshcrypto.node', - '../build/Release/cpufeatures.node', - ], + alias: { + 'cpu-features': false, + './crypto/build/Release/sshcrypto.node': false, + '../build/Release/cpufeatures.node': false, + }, }) diff --git a/webpack.plugin.config.js b/webpack.plugin.config.js index 59594655..e81a819d 100644 --- a/webpack.plugin.config.js +++ b/webpack.plugin.config.js @@ -39,6 +39,7 @@ module.exports = options => { cacheDirectory: path.resolve(options.dirname, 'node_modules', '.webpack-cache'), }, resolve: { + alias: options.alias ?? {}, modules: ['.', 'src', 'node_modules', '../app/node_modules'].map(x => path.join(options.dirname, x)), extensions: ['.ts', '.js'], },