2026-09-10 12:17:47 +03:30
|
|
|
/**
|
|
|
|
|
* esbuild config for Docker release bundle (apps/api/release/app.js).
|
|
|
|
|
* Used by: node scripts/bundle-release.cjs
|
|
|
|
|
*/
|
|
|
|
|
const path = require('path');
|
|
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
|
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',
|
2026-11-14 15:07:11 +03:30
|
|
|
// Native image library, loaded lazily by ImageVariantService; absent = no resizing.
|
|
|
|
|
'sharp',
|
2026-09-10 12:17:47 +03:30
|
|
|
'@nestjs/microservices',
|
|
|
|
|
'@nestjs/microservices/*',
|
|
|
|
|
'@nestjs/websockets',
|
|
|
|
|
'@nestjs/websockets/*',
|
|
|
|
|
],
|
|
|
|
|
sourcemap: false,
|
|
|
|
|
logLevel: 'info',
|
|
|
|
|
};
|