Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"start": "npx turbo watch build",
"dev": "npx turbo watch dev",
"build": "npx turbo build",
"build:fast": "FAST_BUILD=1 npx turbo build",
"test": "npx turbo test",
"test:watch": "npx turbo watch test",
"check-types": "npx turbo check-types",
Expand Down
3 changes: 2 additions & 1 deletion packages/rivetkit/turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"build": {
"dependsOn": ["^build", "dump-openapi", "build:schema"],
"inputs": ["src/**", "tsconfig.json", "tsup.config.ts", "package.json"],
"outputs": ["dist/**"]
"outputs": ["dist/**"],
"env": ["FAST_BUILD"]
},
"test": {
"dependsOn": ["^test", "build"],
Expand Down
17 changes: 11 additions & 6 deletions tsup.base.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
import type { Options } from "tsup";

const FAST_BUILD = process.env.FAST_BUILD === "1";

export default {
target: "node16",
platform: "node",
format: ["cjs", "esm"],
sourcemap: true,
clean: true,
dts: {
compilerOptions: {
skipLibCheck: true,
resolveJsonModule: true,
},
},
// DTS takes the longest time, so we skip it if doing a fast build
dts: FAST_BUILD
? false
: {
compilerOptions: {
skipLibCheck: true,
resolveJsonModule: true,
},
},
minify: false,
// IMPORTANT: Splitting is required to fix a bug with ESM (https://github.com/egoist/tsup/issues/992#issuecomment-1763540165)
splitting: true,
Expand Down
3 changes: 2 additions & 1 deletion turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"build": {
"dependsOn": ["^build"],
"inputs": ["src/**", "tsconfig.json", "tsup.config.ts", "package.json"],
"outputs": ["dist/**"]
"outputs": ["dist/**"],
"env": ["FAST_BUILD"]
},
"check-types": {
"inputs": [
Expand Down
Loading