Skip to content

Commit c7e79a4

Browse files
fix: re-export presets/utils
1 parent 7703e52 commit c7e79a4

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

.changeset/violet-countries-sneeze.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@svbstrate/core": patch
3+
---
4+
5+
Re-export `presets` and `utils` for external library consumption

packages/core/scripts/build.js

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
const path = require("path");
22

33
const options = {
4+
entryPoints: ["lib/index.ts", "lib/presets.ts", "lib/utils.ts"],
45
sourcemap: true,
56
logLevel: "info",
67
bundle: true,
8+
minify: true,
9+
outdir: path.join(__dirname, "../dist"),
710
};
811

912
require("esbuild").buildSync({
10-
entryPoints: ["lib/index.ts"],
1113
format: "cjs",
12-
outfile: path.join(__dirname, "../dist/index.cjs.js"),
14+
entryNames: "[dir]/[name].cjs",
1315
...options,
1416
});
1517

1618
require("esbuild").buildSync({
17-
entryPoints: ["lib/index.ts"],
1819
format: "esm",
19-
outfile: path.join(__dirname, "../dist/index.esm.js"),
20+
entryNames: "[dir]/[name].esm",
2021
...options,
2122
});

0 commit comments

Comments
 (0)