chore(desktop/esbuild): convert webpack config

This commit is contained in:
Elian Doran 2025-05-23 17:33:57 +03:00
parent d7f8946c98
commit 6f8bf58456
No known key found for this signature in database
3 changed files with 48 additions and 4 deletions

View File

@ -44,6 +44,46 @@
"nx": { "nx": {
"name": "desktop", "name": "desktop",
"targets": { "targets": {
"build": {
"executor": "@nx/esbuild:esbuild",
"outputs": [
"{options.outputPath}"
],
"options": {
"main": "apps/desktop/src/electron-main.ts",
"outputPath": "apps/desktop/dist",
"outputFileName": "main.js",
"tsConfig": "apps/desktop/tsconfig.app.json",
"platform": "node",
"external": [
"electron",
"@electron/remote",
"better-sqlite3",
"./xhr-sync-worker.js"
],
"format": [
"cjs"
],
"assets": [
{
"glob": "**/*",
"input": "apps/server/dist/node_modules",
"output": "node_modules"
},
{
"glob": "**/*",
"input": "apps/server/dist/assets",
"output": "."
},
{
"glob": "xhr-sync-worker.js",
"input": "apps/server/node_modules/jsdom/lib/jsdom/living/xhr",
"output": ""
}
],
"declarationRootDir": "apps/desktop/src"
}
},
"rebuild-deps": { "rebuild-deps": {
"executor": "nx:run-commands", "executor": "nx:run-commands",
"dependsOn": [ "dependsOn": [
@ -110,4 +150,4 @@
} }
} }
} }
} }

View File

@ -1,17 +1,21 @@
{ {
"extends": "../../tsconfig.base.json", "extends": "../../tsconfig.base.json",
"compilerOptions": { "compilerOptions": {
"module": "ESNext",
"moduleResolution": "bundler",
"target": "ES2020",
"outDir": "dist", "outDir": "dist",
"strict": false,
"types": [ "types": [
"node", "node",
"express" "express"
], ],
"rootDir": "src", "rootDir": "src",
"tsBuildInfoFile": "dist/tsconfig.app.tsbuildinfo", "tsBuildInfoFile": "dist/tsconfig.app.tsbuildinfo"
"verbatimModuleSyntax": false
}, },
"include": [ "include": [
"src/**/*.ts" "src/**/*.ts",
"../server/src/*.d.ts"
], ],
"exclude": [ "exclude": [
"eslint.config.js", "eslint.config.js",