mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-15 20:52:41 +00:00
TGUI v3.0
This ports TGUI, and makes the old nano crew monitor and the disposal bins use it as first examples.
This commit is contained in:
22
tgui/packages/tgui-dev-server/index.js
Normal file
22
tgui/packages/tgui-dev-server/index.js
Normal file
@@ -0,0 +1,22 @@
|
||||
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();
|
||||
Reference in New Issue
Block a user