Skip to content
This repository was archived by the owner on Jul 24, 2025. It is now read-only.

Commit 85892b3

Browse files
authored
chore: fix build on windows (#70)
1 parent e8dd1e2 commit 85892b3

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"build": "tsx scripts/bundle.ts",
99
"test": "playwright test",
1010
"prettier": "pnpm prettier-ci --write",
11-
"prettier-ci": "prettier --cache --ignore-path=.gitignore --check '**/*.{js,jsx,ts,tsx,html,css,json,md,yml}'",
11+
"prettier-ci": "prettier --cache --ignore-path=.gitignore --check \"**/*.{js,jsx,ts,tsx,html,css,json,md,yml}\"",
1212
"ci": "tsc && pnpm prettier-ci && pnpm build && cd playground && tsc && cd .. && pnpm test",
1313
"release": "pnpm build && tsx scripts/release.ts"
1414
},

scripts/bundle.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { rmSync, writeFileSync } from "node:fs";
1+
import { rmSync, writeFileSync, copyFileSync } from "node:fs";
22
import { execSync } from "node:child_process";
33
import { build, BuildOptions, context } from "esbuild";
44

@@ -51,7 +51,8 @@ module.exports.default = react;`,
5151
outfile: "dist/index.mjs",
5252
}),
5353
]).then(() => {
54-
execSync("cp LICENSE README.md dist/");
54+
copyFileSync("LICENSE", "dist/LICENSE");
55+
copyFileSync("README.md", "dist/README.md");
5556

5657
execSync(
5758
"tsc src/index.ts --declaration --emitDeclarationOnly --outDir dist --module es2020 --moduleResolution node",

0 commit comments

Comments
 (0)