Files
sarcoph 66962a8816 first attempt at implementing TGUI 3
trying to update from TGUI Next to TGUI 3, so we can later upgrade from TGUI 3 to TGUI 4.
2022-02-26 16:43:25 -09:00

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();