diff --git a/packages/synapse-client/package.json b/packages/synapse-client/package.json index 08bb0b7894..40ef7241a5 100644 --- a/packages/synapse-client/package.json +++ b/packages/synapse-client/package.json @@ -30,7 +30,7 @@ "get-spec": "pnpm get-spec:production", "configure": "openapi-generator-cli version-manager set 7.4.0", "generate": "MODEL_NAME_MAPPINGS=$(npx ts-node src/util/generateModelNameMappings.ts); pnpm configure && rimraf src/generated && openapi-generator-cli generate -i src/spec/openapispecification.json -c config.json -o src/generated -t out/ --model-name-mappings $MODEL_NAME_MAPPINGS ", - "build": "rimraf ./dist && pnpm generate && tsc", + "build": "rimraf ./dist && pnpm generate && tsup && tsc", "test": "vitest" }, "keywords": [], diff --git a/packages/synapse-client/tsconfig.json b/packages/synapse-client/tsconfig.json index 36d92ea4ab..fb11601141 100644 --- a/packages/synapse-client/tsconfig.json +++ b/packages/synapse-client/tsconfig.json @@ -8,6 +8,7 @@ "moduleResolution": "bundler", "allowJs": false, "noEmit": false, + "emitDeclarationOnly": true, "isolatedModules": true, "noFallthroughCasesInSwitch": true, "noUnusedLocals": false diff --git a/packages/synapse-client/tsup.config.ts b/packages/synapse-client/tsup.config.ts new file mode 100644 index 0000000000..48004e2b78 --- /dev/null +++ b/packages/synapse-client/tsup.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'tsup' + +export default defineConfig({ + entry: { index: './src/index.ts' }, + format: ['esm', 'cjs'], + dts: false, // handled by tsc +})