Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
fix: try updating tsup.config to account for .tsx
Scott Wilsonf9f098af86df
diff --git a/backend/tsconfig.json b/backend/tsconfig.jsonindex dba51e639b..523e6de5be 100644--- a/backend/tsconfig.json+++ b/backend/tsconfig.json@@ -24,8 +24,7 @@"skipLibCheck": true,"baseUrl": ".","paths": {- "@app/*": ["./src/*"],- "*": ["*", "*.tsx", "*.ts"]+ "@app/*": ["./src/*"]},"jsx": "react-jsx"},diff --git a/backend/tsup.config.js b/backend/tsup.config.jsindex 9e37870ba5..e09a21ff23 100644--- a/backend/tsup.config.js+++ b/backend/tsup.config.js@@ -2,8 +2,8 @@import path from "node:path";import fs from "fs/promises";-import { replaceTscAliasPaths } from "tsc-alias";-import { defineConfig } from "tsup";+import {replaceTscAliasPaths} from "tsc-alias";+import {defineConfig} from "tsup";// Instead of using tsx or tsc for building, consider using tsup.// TSX serves as an alternative to Node.js, allowing you to build directly on the Node.js runtime.@@ -50,7 +50,17 @@ export default defineConfig({const isFile = await fs.stat(`${absPath}.ts`).then((el) => el.isFile)- .catch((err) => err.code === "ENOTDIR");+ .catch(async (err) => {+ if (err.code === "ENOTDIR") {+ return true;+ }++ // If .ts file doesn't exist, try checking for .tsx file+ return fs+ .stat(`${absPath}.tsx`)+ .then((el) => el.isFile)+ .catch((err) => err.code === "ENOTDIR");+ });return {path: isFile ? `${args.path}.mjs` : `${args.path}/index.mjs`,