@@ -7,15 +7,14 @@ import type {
77import { ContextBuilderImpl } from "./context.ts" ;
88import { Ddt } from "./ddt.ts" ;
99import { Loader } from "./loader.ts" ;
10- import { isDenoCacheIssueError } from "./utils.ts" ;
10+ import { importPlugin , isDenoCacheIssueError } from "./utils.ts" ;
1111import type { BaseUi } from "./base/ui.ts" ;
1212
13- import type { Denops , Entrypoint } from "jsr: @denops/std@~7.6.0 " ;
13+ import type { Denops , Entrypoint } from "@denops/std" ;
1414
15- import { toFileUrl } from "jsr:@std/path@~1.1.0/to-file-url" ;
16- import { is } from "jsr:@core/unknownutil@~4.3.0/is" ;
17- import { ensure } from "jsr:@core/unknownutil@~4.3.0/ensure" ;
18- import { Lock } from "jsr:@core/asyncutil@~1.2.0/lock" ;
15+ import { is } from "@core/unknownutil/is" ;
16+ import { ensure } from "@core/unknownutil/ensure" ;
17+ import { Lock } from "@core/asyncutil/lock" ;
1918
2019export const main : Entrypoint = ( denops : Denops ) => {
2120 const loaders : Record < string , Loader > = { } ;
@@ -104,12 +103,9 @@ export const main: Entrypoint = (denops: Denops) => {
104103 const path = ensure ( arg1 , is . String ) as string ;
105104
106105 try {
107- // NOTE: Import module with fragment so that reload works properly.
108- // https://github.com/vim-denops/denops.vim/issues/227
109- const mod = await import (
110- `${ toFileUrl ( path ) . href } #${ performance . now ( ) } `
111- ) ;
112- const obj = new mod . Config ( ) ;
106+ const mod = await importPlugin ( path ) ;
107+ // deno-lint-ignore no-explicit-any
108+ const obj = new ( mod as any ) . Config ( ) ;
113109 await obj . config ( { denops, contextBuilder } ) ;
114110 } catch ( e ) {
115111 if ( isDenoCacheIssueError ( e ) ) {
0 commit comments