Skip to content

Commit

Permalink
dynamically import files on watch mode
Browse files Browse the repository at this point in the history
  • Loading branch information
catplvsplus committed Apr 30, 2024
1 parent 254ebc2 commit be6c5a7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/reciple/src/bin.mts
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ watcher?.on('all', async event => {
});

async function initializeClient() {
process.once('uncaughtException', processErrorHandler);
process.once('unhandledRejection', processErrorHandler);
process.on('uncaughtException', processErrorHandler);
process.on('unhandledRejection', processErrorHandler);

if (publicClient) {
await publicClient.destroy(true);
Expand All @@ -131,7 +131,7 @@ async function initializeClient() {
addEventListenersToClient(client);

const modules = await client.modules.resolveModuleFiles({
files: await findModules(config.modules, (f) => defaultModuleFilesFilter(f)),
files: (await findModules(config.modules, (f) => defaultModuleFilesFilter(f))).map(f => watcher ? `${f}?time=${Date.now()}` : f),
disableVersionCheck: config.modules?.disableModuleVersionCheck
});

Expand Down

0 comments on commit be6c5a7

Please sign in to comment.