mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-05-20 13:47:12 +01:00
ebebb87497
* guess we'll try again * . * bun up * . * . * seach exclude * another test * testing some changes from JL * . * dev * back to dir * . * . * bun cache * urg * try this * self caches * dependency up * Update ci.yml
32 lines
580 B
TypeScript
32 lines
580 B
TypeScript
/**
|
|
* @file
|
|
* @copyright 2020 Aleksej Komarov
|
|
* @license MIT
|
|
*/
|
|
|
|
import fs from 'node:fs';
|
|
|
|
import { reloadByondCache } from './reloader';
|
|
import { RspackCompiler } from './webpack';
|
|
|
|
const reloadOnce = process.argv.includes('--reload');
|
|
|
|
async function setupServer() {
|
|
fs.mkdirSync('./public/.tmp', { recursive: true });
|
|
|
|
const compiler = new RspackCompiler();
|
|
|
|
await compiler.setup();
|
|
|
|
// Reload cache once
|
|
if (reloadOnce) {
|
|
await reloadByondCache(compiler.bundleDir);
|
|
return;
|
|
}
|
|
|
|
// Run a development server
|
|
await compiler.watch();
|
|
}
|
|
|
|
setupServer();
|