Skip to content

Commit

Permalink
fix: rollup reading package json
Browse files Browse the repository at this point in the history
  • Loading branch information
sedghi committed Feb 28, 2025
1 parent 4b6c2df commit fd0c0c0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ import commonjs from "@rollup/plugin-commonjs";
// import babelRuntime from "@rollup/plugin-transform-runtime"
import json from "@rollup/plugin-json";
import replace from "@rollup/plugin-replace";
import pkg from "./package.json" assert { type: "json" };
import { readFileSync } from "fs";

const pkg = JSON.parse(
readFileSync(new URL("./package.json", import.meta.url), "utf8")
);

export default {
input: "src/index.js",
Expand Down

0 comments on commit fd0c0c0

Please sign in to comment.