@@ -14,20 +14,19 @@ import type {
1414 UserOptions ,
1515} from "./types.ts" ;
1616import { Loader } from "./loader.ts" ;
17- import { isDenoCacheIssueError } from "./utils.ts" ;
17+ import { importPlugin , isDenoCacheIssueError } from "./utils.ts" ;
1818import { createCallbackContext } from "./callback.ts" ;
1919import { getFilter , getPreviewer , onCompleteDone , onEvent } from "./ext.ts" ;
2020import type { BaseUi } from "./base/ui.ts" ;
2121import type { BaseSource } from "./base/source.ts" ;
2222import type { BaseFilter } from "./base/filter.ts" ;
2323
24- import type { Denops , Entrypoint } from "jsr: @denops/std@~7.6.0 " ;
25- import * as vars from "jsr: @denops/std@~7.6.0 /variable" ;
24+ import type { Denops , Entrypoint } from "@denops/std" ;
25+ import * as vars from "@denops/std/variable" ;
2626
27- import { ensure } from "jsr:@core/unknownutil@~4.3.0/ensure" ;
28- import { is } from "jsr:@core/unknownutil@~4.3.0/is" ;
29- import { Lock } from "jsr:@core/asyncutil@~1.2.0/lock" ;
30- import { toFileUrl } from "jsr:@std/path@~1.1.0/to-file-url" ;
27+ import { ensure } from "@core/unknownutil/ensure" ;
28+ import { is } from "@core/unknownutil/is" ;
29+ import { Lock } from "@core/asyncutil/lock" ;
3130
3231export const main : Entrypoint = ( denops : Denops ) => {
3332 const loader = new Loader ( ) ;
@@ -193,12 +192,9 @@ export const main: Entrypoint = (denops: Denops) => {
193192 await lock . lock ( async ( ) => {
194193 const path = ensure ( arg1 , is . String ) as string ;
195194 try {
196- // NOTE: Import module with fragment so that reload works properly.
197- // https://github.com/vim-denops/denops.vim/issues/227
198- const mod = await import (
199- `${ toFileUrl ( path ) . href } #${ performance . now ( ) } `
200- ) ;
201- const obj = new mod . Config ( ) ;
195+ const mod = await importPlugin ( path ) ;
196+ // deno-lint-ignore no-explicit-any
197+ const obj = new ( mod as any ) . Config ( ) ;
202198 await obj . config ( { denops, contextBuilder, setAlias } ) ;
203199 } catch ( e ) {
204200 if ( isDenoCacheIssueError ( e ) ) {
0 commit comments