mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-20 14:45:05 +00:00
* Fixes tgui dev server [NO GBP] (#79898) ## About The Pull Request - the .js extensions were required, this is my fault. - fixes a crash "automatic publicPath is not supported in this browser" ## Why It's Good For The Game Bug fixes. Dev server is working ## Changelog N/A nothing player facing * Fixes tgui dev server [NO GBP] --------- Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
31 lines
673 B
JavaScript
31 lines
673 B
JavaScript
/**
|
|
* @file
|
|
* @copyright 2020 Aleksej Komarov
|
|
* @license MIT
|
|
*/
|
|
|
|
import { createCompiler } from './webpack.js';
|
|
import { reloadByondCache } from './reloader.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();
|