Skip to content

Commit

Permalink
fix: node esm (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinhagemeister authored Sep 26, 2024
1 parent 0d8f177 commit 96adfcf
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -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<string, DenoResolveResult>();
Expand Down
2 changes: 1 addition & 1 deletion src/prefixPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
DenoResolveResult,
resolveDeno,
resolveViteSpecifier,
} from "./resolver";
} from "./resolver.js";
import process from "node:process";

export default function denoPrefixPlugin(
Expand Down
2 changes: 1 addition & 1 deletion src/resolver.ts
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"outDir": "./dist/",
"declaration": true,
"target": "ES2020",
"module": "ES2022",
"moduleResolution": "Bundler"
"module": "NodeNext",
"moduleResolution": "NodeNext"
},
"include": ["src"],
"exclude": ["vendor/"]
Expand Down

0 comments on commit 96adfcf

Please sign in to comment.