Skip to content

Commit ffadf66

Browse files
committed
refactor: update pkg-types to v2
1 parent 904f567 commit ffadf66

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"magic-string": "^0.30.17",
5353
"mlly": "^1.7.4",
5454
"pathe": "^2.0.3",
55-
"pkg-types": "^1.3.1",
55+
"pkg-types": "^2.2.0",
5656
"unplugin": "^2.3.6"
5757
},
5858
"devDependencies": {

pnpm-lock.yaml

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/plugin/runtime/imports.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { readPackageJSON } from "pkg-types";
1+
// TODO: Use normal import in next major with ESM-only dist
2+
// import { readPackageJSON } from "pkg-types";
23
import {
34
genSafeVariableName,
45
genObjectFromRaw,
@@ -21,6 +22,7 @@ export async function getWasmImports(
2122
}
2223

2324
// Try to resolve from nearest package.json
25+
const { readPackageJSON } = await import("pkg-types");
2426
const pkgJSON = await readPackageJSON(asset.id);
2527

2628
let resolved = true;

0 commit comments

Comments
 (0)