Skip to content

Commit

Permalink
EEGVisEnabled check issue and webpack cache (#9159)
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
laemtl committed Mar 27, 2024
1 parent 8bbcfbc commit b7ff2c6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion npm-postinstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 -----'
Expand Down
3 changes: 2 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ modulePlugins.push(
})
);

if (EEGVisEnabled !== 'true') {
if (EEGVisEnabled !== 'true' && EEGVisEnabled !== '1' ) {
modulePlugins.push(
new IgnorePlugin({
resourceRegExp: /react-series-data-viewer/,
Expand Down Expand Up @@ -235,6 +235,7 @@ let config = [
resolve: resolve,
module: mod,
stats: 'errors-warnings',
cache: {type: 'filesystem'},
},
];

Expand Down

0 comments on commit b7ff2c6

Please # to comment.