mirror of
https://github.com/KabKebab/GS13.git
synced 2026-07-14 01:19:04 +01:00
291dcf9515
[TESTMERGE] Properly working TGUI Next
23 lines
561 B
JavaScript
23 lines
561 B
JavaScript
import { setupWebpack, getWebpackConfig } from './webpack.js';
|
|
import { reloadByondCache } from './reloader.js';
|
|
|
|
const noHot = process.argv.includes('--no-hot');
|
|
const reloadOnce = process.argv.includes('--reload');
|
|
|
|
const setupServer = async () => {
|
|
const config = await getWebpackConfig({
|
|
mode: 'development',
|
|
hot: !noHot,
|
|
});
|
|
// Reload cache once
|
|
if (reloadOnce) {
|
|
const bundleDir = config.output.path;
|
|
await reloadByondCache(bundleDir);
|
|
return;
|
|
}
|
|
// Run a development server
|
|
await setupWebpack(config);
|
|
};
|
|
|
|
setupServer();
|