Files
tehran_taj/apps/api/esbuild.release.config.cjs
T
mahmoodandClaude Code 3e9f532c6c fix(images): ship Linux codecs and preserve original-image fallback
Vendor the locked sharp Linux runtime and verify it during Docker builds. Add complete image response lengths and persistent frontend fallbacks, with real-codec HTTP and isolated release regression tests. Refresh tested API, admin and customer release artifacts.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-11-26 18:12:21 +03:30

31 lines
950 B
JavaScript

/**
* esbuild config for Docker release bundle (apps/api/release/app.js).
* Used by: node scripts/bundle-release.cjs
*/
const path = require('path');
module.exports = {
// Keep output stable whether invoked from the workspace or API directory.
absWorkingDir: __dirname,
entryPoints: [path.join(__dirname, 'dist/main.js')],
outfile: path.join(__dirname, 'release/app.js'),
bundle: true,
platform: 'node',
target: 'node20',
format: 'cjs',
// Prisma ships native binaries — keep out of the JS bundle and vendor into release/
// Nest optional peers are required dynamically and are not used by this API.
external: [
'@prisma/client',
'.prisma/client',
// Native image library; bundle-release.cjs ships its locked Linux runtime in vendor/.
'sharp',
'@nestjs/microservices',
'@nestjs/microservices/*',
'@nestjs/websockets',
'@nestjs/websockets/*',
],
sourcemap: false,
logLevel: 'info',
};