diff --git a/src/index.ts b/src/index.ts index 35c70c9..31f48b3 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,7 +1,7 @@ import { Plugin } from "vite"; -import prefixPlugin from "./prefixPlugin"; -import mainPlugin from "./resolvePlugin"; -import { DenoResolveResult } from "./resolver"; +import prefixPlugin from "./prefixPlugin.js"; +import mainPlugin from "./resolvePlugin.js"; +import { DenoResolveResult } from "./resolver.js"; export default function denoPlugin(): Plugin[] { const cache = new Map(); diff --git a/src/prefixPlugin.ts b/src/prefixPlugin.ts index 88f1581..2e3825e 100644 --- a/src/prefixPlugin.ts +++ b/src/prefixPlugin.ts @@ -3,7 +3,7 @@ import { DenoResolveResult, resolveDeno, resolveViteSpecifier, -} from "./resolver"; +} from "./resolver.js"; import process from "node:process"; export default function denoPrefixPlugin( diff --git a/src/resolver.ts b/src/resolver.ts index 1b84525..8fadfdf 100644 --- a/src/resolver.ts +++ b/src/resolver.ts @@ -1,6 +1,6 @@ import { exec } from "node:child_process"; import process from "node:process"; -import { execAsync } from "./utils"; +import { execAsync } from "./utils.js"; export type DenoMediaType = | "TypeScript" diff --git a/tsconfig.json b/tsconfig.json index 9c7a6d4..8909955 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,8 +3,8 @@ "outDir": "./dist/", "declaration": true, "target": "ES2020", - "module": "ES2022", - "moduleResolution": "Bundler" + "module": "NodeNext", + "moduleResolution": "NodeNext" }, "include": ["src"], "exclude": ["vendor/"]