diff --git a/package-lock.json b/package-lock.json index 0639d829..dc16e43f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -52,7 +52,7 @@ "prettier-eslint": "^15.0.1", "ts-node": "^10.9.2", "tsc": "^2.0.4", - "tsup": "^8.0.1", + "tsup": "^8.5.1", "tsx": "^4.19.1", "typedoc": "^0.25.13", "typescript": "^5.4.5", diff --git a/package.json b/package.json index cd860cef..88ef84e6 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "test:watch": "vitest", "test:once": "vitest run", "test:coverage": "vitest --coverage", - "dev": "NODE_OPTIONS='--max-old-space-size=16384' tsup --watch", + "dev": "NODE_OPTIONS='--max-old-space-size=16384' tsup --watch --config tsup.config.dev.js", "prepare": "husky", "lint": "eslint src", "lint:fix": "eslint --fix", @@ -73,7 +73,7 @@ "prettier-eslint": "^15.0.1", "ts-node": "^10.9.2", "tsc": "^2.0.4", - "tsup": "^8.0.1", + "tsup": "^8.5.1", "tsx": "^4.19.1", "typedoc": "^0.25.13", "typescript": "^5.4.5", diff --git a/tsup.config.dev.js b/tsup.config.dev.js new file mode 100644 index 00000000..5de64b78 --- /dev/null +++ b/tsup.config.dev.js @@ -0,0 +1,21 @@ +import { defineConfig } from 'tsup' +import { modernConfig } from './tsup.config.js' + +/** + * Dev config: Optimized for faster development builds + * - Skips type generation (dts: false) for faster compilation + */ +export default defineConfig([ + { + ...modernConfig({ + entry: [ + "src/**/*.ts", + "src/**/*.tsx", + "!src/**/__test__", + "!**/*.test.ts", + "!**/*.test.tsx", + ], + }), + dts: false + }, +]) diff --git a/tsup.config.js b/tsup.config.js index 70fe3c6f..49a5f244 100644 --- a/tsup.config.js +++ b/tsup.config.js @@ -11,7 +11,7 @@ export default defineConfig([ }), ]) -function modernConfig(opts) { +export function modernConfig(opts) { return { entry: opts.entry, define: {