Skip to content

Commit ebbbbe9

Browse files
authored
fix: rollup reading package json (#424)
1 parent 4b6c2df commit ebbbbe9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

rollup.config.mjs

+5-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ import commonjs from "@rollup/plugin-commonjs";
66
// import babelRuntime from "@rollup/plugin-transform-runtime"
77
import json from "@rollup/plugin-json";
88
import replace from "@rollup/plugin-replace";
9-
import pkg from "./package.json" assert { type: "json" };
9+
import { readFileSync } from "fs";
10+
11+
const pkg = JSON.parse(
12+
readFileSync(new URL("./package.json", import.meta.url), "utf8")
13+
);
1014

1115
export default {
1216
input: "src/index.js",

0 commit comments

Comments
 (0)