Files
VOREStation/tgui/packages/tgui-dev-server/index.ts
T
Kashargul ebebb87497 RS Pack try 2 (#17962)
* guess we'll try again

* .

* bun up

* .

* .

* seach exclude

* another test

* testing some changes from JL

* .

* dev

* back to dir

* .

* .

* bun cache

* urg

* try this

* self caches

* dependency up

* Update ci.yml
2025-07-10 08:53:25 +02: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();