Files
JeremiahandRoxy f223780c09 [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-11 18:03:03 -04:00

32 lines
580 B
TypeScript

/**
* @file
* @copyright 2020 Aleksej Komarov
* @license MIT
*/
import fs from 'node:fs';
import { reloadByondCache } from './reloader';
import { RspackCompiler } from './webpack';
const reloadOnce = process.argv.includes('--reload');
async function setupServer() {
fs.mkdirSync('./public/.tmp', { recursive: true });
const compiler = new RspackCompiler();
await compiler.setup();
// Reload cache once
if (reloadOnce) {
await reloadByondCache(compiler.bundleDir);
return;
}
// Run a development server
await compiler.watch();
}
setupServer();