From d07342cfed043b6f8805b29f5896f259952befd0 Mon Sep 17 00:00:00 2001 From: Chris Chua Date: Fri, 8 Nov 2024 13:15:57 +0800 Subject: [PATCH] fix compiling by ignoring missing module Missing module osx-temperature-sensor --- rspack.config.js | 4 ++++ rspack.node.config.js | 11 +++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/rspack.config.js b/rspack.config.js index 3fccfc3abb..0f94ee86ee 100644 --- a/rspack.config.js +++ b/rspack.config.js @@ -116,6 +116,10 @@ module.exports = (env, argv) => { plugins: [ //new BundleAnalyzerPlugin(), + new rspack.IgnorePlugin({ + resourceRegExp: /osx-temperature-sensor/, + }), + new rspack.optimize.LimitChunkCountPlugin({ maxChunks: 1, }), diff --git a/rspack.node.config.js b/rspack.node.config.js index 6d06015a9f..8e543af99a 100644 --- a/rspack.node.config.js +++ b/rspack.node.config.js @@ -1,3 +1,5 @@ +const rspack = require('@rspack/core'); + module.exports = (env) => { return { target: 'node', @@ -18,7 +20,12 @@ module.exports = (env) => { rules: [ { test: /\.node$/, loader: 'node-loader' }, ] - } - + }, + + plugins: [ + new rspack.IgnorePlugin({ + resourceRegExp: /osx-temperature-sensor/, + }), + ], }; }; \ No newline at end of file