From 981bf7ea631df4e78149c13469191d2c2851f548 Mon Sep 17 00:00:00 2001 From: Talisson Costa Date: Fri, 12 Jun 2026 16:51:52 -0300 Subject: [PATCH] fix(frontend): keep dev-server overlay to compile errors only The overlay iframe intercepts all pointer events, so warnings (the Sass @import deprecation fires on every compile) and runtime errors hijacked the screen, blocking the app and any E2E run against the dev server. Restrict the overlay to compile errors and silence the non-actionable Sass @import deprecation; warnings still reach the terminal and browser console. Co-Authored-By: Claude Opus 4.8 (1M context) --- frontend/rspack/rspack.config.local.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/frontend/rspack/rspack.config.local.js b/frontend/rspack/rspack.config.local.js index 0a9fa8fdf9b0..c2a9aae09c8c 100644 --- a/frontend/rspack/rspack.config.local.js +++ b/frontend/rspack/rspack.config.local.js @@ -1,6 +1,8 @@ // rspack.config.local.js (dev) const rspack = require('@rspack/core') -const { ReactRefreshRspackPlugin: ReactRefreshPlugin } = require('@rspack/plugin-react-refresh') +const { + ReactRefreshRspackPlugin: ReactRefreshPlugin, +} = require('@rspack/plugin-react-refresh') const path = require('path') const express = require('express') @@ -9,11 +11,14 @@ const base = require('../rspack.config') module.exports = { ...base, devServer: { + app: async () => express(), + // Overlay only for compile errors — the overlay iframe blocks all + // pointer events, and warnings/runtime rejections fire routinely. + client: { overlay: { runtimeErrors: false, warnings: false } }, historyApiFallback: true, hot: true, liveReload: false, port: process.env.PORT || 8080, - app: async () => express(), setupMiddlewares: (middlewares, devServer) => { // Register the Express routes from api/index on the dev server's app require('../api/dev-routes')(devServer.app) @@ -46,6 +51,12 @@ module.exports = { { loader: 'sass-loader', options: { + // The codebase still uses @import; the deprecation fires on + // every build and is not actionable here. + sassOptions: { + silenceDeprecations: ['import'], + }, + sourceMap: true, }, },