Skip to content

Commit

Permalink
Remove JSON import to fix build error on recent NodeJS (#53)
Browse files Browse the repository at this point in the history
* Update json import command in rollup.config.js

* Remove json import
  • Loading branch information
mganjoo authored Jul 14, 2024
1 parent 120d6aa commit 12e827b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@ import postcss from "rollup-plugin-postcss";
import filesize from "rollup-plugin-filesize";
import dts from "rollup-plugin-dts";
import { defineConfig } from "rollup";
import pkg from "./package.json" assert { type: "json" };

const inputFile = "src/index.ts";
const production = process.env.PRODUCTION === "true";

export default defineConfig([
{
input: inputFile,
output: [{ file: pkg.module, format: "es", sourcemap: true }],
output: [{ file: "dist/index.es.js", format: "es", sourcemap: true }],
plugins: [
postcss({ inject: false, minimize: production }),
typescript({
Expand All @@ -23,7 +22,7 @@ export default defineConfig([
},
{
input: inputFile,
output: [{ file: pkg.types, format: "es" }],
output: [{ file: "dist/index.d.ts", format: "es" }],
plugins: [dts()],
},
]);

0 comments on commit 12e827b

Please sign in to comment.