Skip to content

Commit

Permalink
Import module with fragment so that reload works properly.
Browse files Browse the repository at this point in the history
  • Loading branch information
Shougo committed Jul 30, 2023
1 parent 3e1532e commit 899c1bc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion denops/ddu/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
});
Expand Down

0 comments on commit 899c1bc

Please sign in to comment.