Files
Paradise/tgui/packages/tgui-dev-server/index.js
Aylong ae9e36a155 [TGUI] Update dependencies & dev server fix (#30639)
* [TGUI] Update dependencies & dev server fix

* Update yarn.lock

* Update tgui.bundle.js

* Update helpers.min.js

* Fix paradise-paradise

* Rebuild html assets on build

* And here
2025-10-11 11:16:03 +00:00

31 lines
624 B
JavaScript

/**
* @file
* @copyright 2020 Aleksej Komarov
* @license MIT
*/
import { reloadByondCache } from './reloader.js';
import { createCompiler } from './rspack.js';
const noHot = process.argv.includes('--no-hot');
const noTmp = process.argv.includes('--no-tmp');
const reloadOnce = process.argv.includes('--reload');
async function setupServer() {
const compiler = await createCompiler({
hot: !noHot,
useTmpFolder: !noTmp,
});
// Reload cache once
if (reloadOnce) {
await reloadByondCache(compiler.bundleDir);
return;
}
// Run a development server
await compiler.watch();
}
setupServer();