Files
wehub-resource-sync 3a28426bf4
Lint and Format Check / lint-and-format (push) Failing after 0s
Check Migrations / Check for duplicate migration numbers (push) Failing after 1s
CI Pre-merge Check / CI Pre-merge Check (push) Failing after 2m17s
chore: import upstream snapshot with attribution
2026-07-13 12:23:40 +08:00

28 lines
1.1 KiB
TypeScript

import { defineConfig } from 'tsup';
export default defineConfig({
entry: ['src/server.ts'],
format: ['esm'],
target: 'node20',
platform: 'node',
outDir: '../dist',
clean: false, // Don't clean the whole dist folder (frontend is there)
sourcemap: true,
// Don't bundle node_modules, only our code and shared-schemas.
// Exceptions — deps npm nests under backend/node_modules/ instead of hoisting
// to the root, so the Docker runner (which only ships the hoisted root
// node_modules/) can't resolve them at runtime. Inline them into the bundle
// instead of teaching the Dockerfile to merge nested module layers:
// - `lru-cache`: our SigV4 verifier's hot-path cache; a devDep transitive
// pins the older v5 at the root so the workspace copy can't hoist.
// - `file-type`: used by utils/mime-guard; nests under backend/node_modules
// (with its strtok3/token-types deps) alongside the @aws-sdk copies that
// pin a newer minor than the root tree.
noExternal: [/@insforge\/shared-schemas/, 'lru-cache', 'file-type'],
esbuildOptions(options) {
options.alias = {
'@': './src',
};
},
});