From 899c1bc6b5a2c46af200fd085fb5d8f285eff63a Mon Sep 17 00:00:00 2001 From: Shougo Matsushita Date: Sun, 30 Jul 2023 12:05:54 +0900 Subject: [PATCH] Import module with fragment so that reload works properly. --- denops/ddu/app.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/denops/ddu/app.ts b/denops/ddu/app.ts index 38ee7b5..ca897a8 100644 --- a/denops/ddu/app.ts +++ b/denops/ddu/app.ts @@ -162,7 +162,11 @@ export function main(denops: Denops) { // NOTE: Lock until load finished to prevent execute start() API. await lock.lock(async () => { const path = ensure(arg1, is.String); - const mod = await import(toFileUrl(path).href); + // NOTE: Import module with fragment so that reload works properly. + // https://github.com/vim-denops/denops.vim/issues/227 + const mod = await import( + `${toFileUrl(path).href}#${performance.now()}` + ); const obj = new mod.Config(); await obj.config({ denops, contextBuilder, setAlias }); });