Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions frontend/rspack/rspack.config.local.js
Original file line number Diff line number Diff line change
@@ -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')

Expand All @@ -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)
Expand Down Expand Up @@ -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,
},
},
Expand Down
Loading