Files
CHOMPStation2/tgui/packages/tgui-dev-server/index.js
ShadowLarkens 1cded01770 TGUI v3.0
This ports TGUI, and makes the old nano crew monitor and the disposal
bins use it as first examples.
2020-07-16 14:59:45 -07: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();