Skip to content

Commit

Permalink
chore: remove min build
Browse files Browse the repository at this point in the history
  • Loading branch information
gregberge committed Dec 23, 2023
1 parent 5b67de9 commit 8127ac8
Showing 1 changed file with 10 additions and 26 deletions.
36 changes: 10 additions & 26 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
import { swc } from "rollup-plugin-swc3";
import ts from "rollup-plugin-ts";

const swcPlugin = (minify) =>
swc({
tsconfig: false,
minify,
jsc: {
parser: {
syntax: "typescript",
},
target: "es2018",
const swcPlugin = swc({
tsconfig: false,
jsc: {
parser: {
syntax: "typescript",
},
});
target: "es2018",
},
});

const tsPlugin = ts({ transpiler: "swc" });

Expand All @@ -28,21 +26,7 @@ const buildEs = ({
file: output,
format: "es",
},
plugins: [swcPlugin(false)],
});

const buildMin = ({
input = "src/index.tsx",
output = "dist/index.min.mjs",
external = ignoreRelative,
} = {}) => ({
input,
external,
output: {
file: output,
format: "es",
},
plugins: [swcPlugin(true)],
plugins: [swcPlugin],
});

const buildTypes = ({
Expand All @@ -59,4 +43,4 @@ const buildTypes = ({
plugins: [tsPlugin],
});

export default [buildEs(), buildMin(), buildTypes()];
export default [buildEs(), buildTypes()];

0 comments on commit 8127ac8

Please sign in to comment.