core: split hmr and watcher

This commit is contained in:
undefined committed 2025-02-20 10:22:29 +08:00
1 parent 4bf405e2b4
commit 2829a5965b
3 files changed
+45 -40

No files matched your search

+1 -2
View File
@@ -39,8 +39,7 @@ export async function apply(ctx: Context) {
await modelSystem.runConfig();
const storage = require('../service/storage');
await storage.loadStorageService();
// Make sure everything is ready and then start main entry
if (argv.options.watch) ctx.plugin(require('../service/watcher').default, {});
ctx.plugin(require('../service/watcher').default, { watch: argv.options.watch });
await require('../service/worker').apply(ctx);
await require('../service/server').apply(ctx);
await require('../service/api').apply(ctx);