diff --git a/ui/config-overrides.js b/ui/config-overrides.js index 5c656b71..9c8210f4 100644 --- a/ui/config-overrides.js +++ b/ui/config-overrides.js @@ -1,3 +1,4 @@ +const os = require("os"); const MonacoWebpackPlugin = require("monaco-editor-webpack-plugin"); module.exports = function override(config, env) { @@ -13,6 +14,17 @@ module.exports = function override(config, env) { "racket", ], }; + // This is a hack to fix the issue with hot reloading on Windows WSL (Docker) + // See: https://github.com/microsoft/WSL/issues/4739 + // To prevent performance issues, we will only enable this on Windows WSL + const isWSL = + process.platform === "linux" && os.release().includes("microsoft"); + if (isWSL) { + config.watchOptions = { + ignored: /node_modules/, + poll: true, + }; + } // by default load all the languages config.plugins.push(new MonacoWebpackPlugin()); config.resolve.fallback = {