Fix for production
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* باندل تکفایل برای Docker (release/app.js) بعد از nest build.
|
||||
* Prisma و bcrypt بهخاطر باینری native خارجی میمانند و در ایمیج نصب میشوند.
|
||||
*/
|
||||
module.exports = {
|
||||
entryPoints: ['dist/src/main.js'],
|
||||
bundle: true,
|
||||
platform: 'node',
|
||||
target: 'node20',
|
||||
format: 'cjs',
|
||||
outfile: 'release/app.js',
|
||||
sourcemap: false,
|
||||
keepNames: true,
|
||||
legalComments: 'none',
|
||||
external: [
|
||||
'@prisma/client',
|
||||
'.prisma/client',
|
||||
'bcrypt',
|
||||
// optional Nest peers — نباید resolve اجباری شوند
|
||||
'@nestjs/microservices',
|
||||
'@nestjs/websockets',
|
||||
'@nestjs/platform-socket.io',
|
||||
'class-transformer/storage',
|
||||
],
|
||||
};
|
||||
Reference in New Issue
Block a user