Skip to content

Commit

Permalink
fix(package): add rollup interop for next-boost/hybrid-disk-cache
Browse files Browse the repository at this point in the history
Add `interop: "auto"` to rollup config and remove terser transformation for remix-image/server

Terser is not useful for nodejs' only package and make debug harder

    BaseCache is not a constructor

is better than

    g is not a constructor

Closes Josh-McFarlin#62
  • Loading branch information
TURMEL Kevin committed Aug 22, 2023
1 parent 6371e8d commit 9f4fa5c
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions packages/remix-image/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import typescript from "rollup-plugin-typescript2";
import terser from "@rollup/plugin-terser";
import replace from "@rollup/plugin-replace";
import { version } from "./package.json";
import { defineConfig } from "rollup";

const external = ["fs", "path", "react", "react-dom"];

Expand All @@ -16,7 +17,7 @@ const tsSettings = {
},
};

export default [
export default defineConfig([
{
input: "src/index.tsx",
output: [
Expand All @@ -25,6 +26,7 @@ export default [
format: "cjs",
sourcemap: true,
exports: "named",
interop: "auto",
},
],
external,
Expand Down Expand Up @@ -57,6 +59,7 @@ export default [
format: "cjs",
sourcemap: true,
exports: "named",
interop: "auto",
},
],
external,
Expand All @@ -77,10 +80,6 @@ export default [
__remix_image_version: version,
},
}),
terser({
keep_fnames: true,
sourceMap: true,
}),
],
},
{
Expand Down Expand Up @@ -125,4 +124,4 @@ export default [
}),
],
},
];
]);

0 comments on commit 9f4fa5c

Please sign in to comment.