Skip to content

Commit

Permalink
build: Fix tsup watch mode for start script
Browse files Browse the repository at this point in the history
  • Loading branch information
bjoluc committed Jul 5, 2023
1 parent 099a495 commit 4b3809f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -26,8 +26,8 @@
"node": ">=14.0.0"
},
"scripts": {
"start": "npm run build -- --watch --source-map",
"build": "node ./build.js",
"start": "npm run build -- --watch",
"build": "tsup",
"prepare": "husky install",
"prepack": "npm run build",
"test": "node ./tests/story.js",
Expand Down
9 changes: 4 additions & 5 deletions build.js → tsup.config.ts 100755 → 100644
@@ -1,10 +1,9 @@
#!/usr/bin/env node
import { defineConfig } from "tsup";

import { build } from "tsup";

build({
export default defineConfig({
clean: true,
entry: ["src/index.ts"],
splitting: false,
target: "node14",
format: "esm",
dts: true,
Expand All @@ -15,4 +14,4 @@ build({
banner: {
js: "import { createRequire } from 'module'; const require = createRequire(import.meta.url);",
},
}).catch(() => process.exit(1));
});

0 comments on commit 4b3809f

Please sign in to comment.