Files
Bubberstation/tgui/rspack.config-dev.ts
Jeremiah 87a4c082ab [tgui] Retvrn to rspack (#91982)
## About The Pull Request
Swaps us back to RSPack. I keep getting pings about this #91925, which I
can only guess is webpack related. That, and I don't want to just give
up on rspack, I was merely frustrated with it while fixing bun builds.

## Why It's Good For The Game
Less javascript. Puts us back on our last build tool. Might fix the html
entity issue
We can also run the config in ts which I think is sweet

## Changelog
2025-07-09 12:17:09 +12:00

30 lines
710 B
TypeScript

import path from 'node:path';
import rspack, { type Configuration } from '@rspack/core';
import oldConfig, { createStats } from './rspack.config';
export const config = {
...oldConfig,
devtool: 'cheap-module-source-map',
devServer: {
hot: true,
},
mode: 'development',
output: {
...oldConfig.output,
path: path.resolve(import.meta.dirname, './public/.tmp'),
},
plugins: [
new rspack.CssExtractRspackPlugin({
chunkFilename: '[name].bundle.css',
filename: '[name].bundle.css',
}),
new rspack.EnvironmentPlugin({
NODE_ENV: 'development',
}),
new rspack.HotModuleReplacementPlugin(),
],
stats: createStats(false),
} satisfies Configuration;