From 70812aa3718c5b9e570d0164d095561ceb6ddd49 Mon Sep 17 00:00:00 2001 From: "xan.lol" Date: Wed, 29 Apr 2026 15:20:57 -0700 Subject: [PATCH] chore: make profile pages work in dev --- rspack.config.ts | 6 +++++- webpack.config.js | 7 +++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/rspack.config.ts b/rspack.config.ts index 99e47d15f..29bfafcfc 100644 --- a/rspack.config.ts +++ b/rspack.config.ts @@ -434,7 +434,11 @@ module.exports = { }, port: 19006, hot: true, - historyApiFallback: true, + historyApiFallback: { + // Handles like `xan.lol` contain dots, which the default history + // fallback treats as asset requests instead of app routes. + disableDotRule: true, + }, compress: true, }, diff --git a/webpack.config.js b/webpack.config.js index 37c110c7b..1c688ae60 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -39,6 +39,13 @@ module.exports = async function (env, argv) { ] if (env.mode === 'development') { config.plugins.push(new ReactRefreshWebpackPlugin()) + config.devServer = config.devServer || {} + config.devServer.historyApiFallback = { + ...(config.devServer.historyApiFallback || {}), + // Handles like `xan.lol` contain dots, which the default history + // fallback treats as asset requests instead of app routes. + disableDotRule: true, + } // Reap zombie HMR WebSocket connections that linger after refresh. // Without this, dead sockets exhaust the browser's per-origin connection // pool and the dev server stops responding. -- 2.51.2