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