fix(server/esbuild): use separate config in order to solve dependency order issue

This commit is contained in:
Elian Doran 2025-05-23 17:11:24 +03:00
parent 306d75e3f3
commit 60af6f5826
No known key found for this signature in database

View File

@ -172,19 +172,12 @@
"outputs": [
"{options.outputPath}"
],
"defaultConfiguration": "production",
"options": {
"main": "apps/server/src/main.ts",
"outputPath": "apps/server/dist",
"outputFileName": "main.js",
"tsConfig": "apps/server/tsconfig.app.json",
"platform": "node",
"external": [
"electron",
"@electron/remote",
"better-sqlite3",
"./xhr-sync-worker.js"
],
"format": [
"cjs"
],
@ -200,8 +193,33 @@
"output": "assets"
}
]
}
}
},
"production": {
"build": {
"executor": "@nx/esbuild:esbuild",
"outputs": [
"{options.outputPath}"
],
"dependsOn": [
"client:build"
],
"options": {
"main": "apps/server/src/main.ts",
"outputPath": "apps/server/dist",
"outputFileName": "main.js",
"tsConfig": "apps/server/tsconfig.app.json",
"platform": "node",
"external": [
"electron",
"@electron/remote",
"better-sqlite3",
"./xhr-sync-worker.js"
],
"format": [
"cjs"
],
"declarationRootDir": "apps/server/src",
"minify": true,
"thirdParty": true,
"esbuildOptions": {
@ -241,13 +259,6 @@
]
}
}
},
"build": {
"dependsOn": [
"client:build",
"build-without-client"
]
}
}
},
"exports": {