Skip to content

Commit a033e04

Browse files
fix(build): remove browser build (#158)
* build: remove pika * build: add esbuild * build(tsconfig): add options for `.d.ts` generation * chore: mark type imports/exports explicitly * build: update npm script * build: add back comment * build: lockfile update --------- Co-authored-by: Keegan Campbell <[email protected]>
1 parent 6df945f commit a033e04

File tree

2 files changed

+10
-23
lines changed

2 files changed

+10
-23
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
"ts-jest": "^29.0.0",
4242
"typescript": "^5.0.0"
4343
},
44-
"peerDependencies": {},
4544
"jest": {
4645
"transform": {
4746
"^.+\\.(ts|tsx)$": [

scripts/build.mjs

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -35,27 +35,16 @@ async function main() {
3535

3636
const entryPoints = ["./pkg/dist-src/index.js"];
3737

38-
await Promise.all([
39-
// Build the a CJS Node.js bundle
40-
esbuild.build({
41-
entryPoints,
42-
outdir: "pkg/dist-node",
43-
bundle: true,
44-
platform: "node",
45-
target: "node18",
46-
format: "cjs",
47-
...sharedOptions,
48-
}),
49-
// Build an ESM browser bundle
50-
esbuild.build({
51-
entryPoints,
52-
outdir: "pkg/dist-web",
53-
bundle: true,
54-
platform: "browser",
55-
format: "esm",
56-
...sharedOptions,
57-
}),
58-
]);
38+
// Build a CJS Node.js bundle
39+
await esbuild.build({
40+
entryPoints,
41+
outdir: "pkg/dist-node",
42+
bundle: true,
43+
platform: "node",
44+
target: "node14",
45+
format: "cjs",
46+
...sharedOptions,
47+
});
5948

6049
// Copy the README, LICENSE to the pkg folder
6150
await copyFile("LICENSE", "pkg/LICENSE");
@@ -75,7 +64,6 @@ async function main() {
7564
...pkg,
7665
files: ["dist-*/**", "bin/**"],
7766
main: "dist-node/index.js",
78-
browser: "dist-web/index.js",
7967
types: "dist-types/index.d.ts",
8068
module: "dist-src/index.js",
8169
sideEffects: false,

0 commit comments

Comments
 (0)