From b7ff2c6aab2e362578c1b8ee0b1b5de4a3e97989 Mon Sep 17 00:00:00 2001 From: Laetitia Fesselier Date: Wed, 27 Mar 2024 08:25:21 -0400 Subject: [PATCH] EEGVisEnabled check issue and webpack cache (#9159) - Fix a WebpackMissingModule error with the EEGBrowser when EEGVisEnabled is set to "1" | "0" instead of "true" | "false". - Set webpack to cache to the filesystem instead of memory. The caching to memory in dev mode of webpack was causing memory issues for machines with less than 2gb of ram. --- npm-postinstall.js | 2 +- webpack.config.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/npm-postinstall.js b/npm-postinstall.js index 7c561ed1618..b4eaba4eaf2 100644 --- a/npm-postinstall.js +++ b/npm-postinstall.js @@ -88,7 +88,7 @@ getConfig.stdout.on('data', (data) => { ); } - if (EEGVisEnabled === 'true') { + if (EEGVisEnabled === 'true' || EEGVisEnabled === '1') { console.info('\n ----- \n >> ' + 'EEG Browser visualization components enabled ' + '\n -----' diff --git a/webpack.config.js b/webpack.config.js index fa328c6f984..a0f7aaca2e0 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -90,7 +90,7 @@ modulePlugins.push( }) ); -if (EEGVisEnabled !== 'true') { +if (EEGVisEnabled !== 'true' && EEGVisEnabled !== '1' ) { modulePlugins.push( new IgnorePlugin({ resourceRegExp: /react-series-data-viewer/, @@ -235,6 +235,7 @@ let config = [ resolve: resolve, module: mod, stats: 'errors-warnings', + cache: {type: 'filesystem'}, }, ];