mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 18:12:29 +08:00
chore(desktop/esbuild): convert webpack config
This commit is contained in:
parent
d7f8946c98
commit
6f8bf58456
@ -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 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -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",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user