Files
Bubberstation/tgui/packages/tgui-dev-server/index.js
SkyratBot 7d975e15d7 [MIRROR] Updates eslint + sorts imports [MDB IGNORE] (#25722)
* Updates eslint + sorts imports

* Update yarn.lock

* Merge conflicts

* Run prettier on everything

* Update CharacterPreferenceWindow.tsx

* ts to tsx, run prettier on these neglected files

---------

Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
2023-12-19 10:57:10 -05:00

31 lines
673 B
JavaScript

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