Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
refactor(server): solve some build type errors
Elian Doran827a8fc1b4fb
diff --git a/apps/server/tsconfig.app.json b/apps/server/tsconfig.app.jsonindex 591b4a5dbc..e5ff1c88fe 100644--- a/apps/server/tsconfig.app.json+++ b/apps/server/tsconfig.app.json@@ -5,6 +5,7 @@"moduleResolution": "bundler","target": "ES2020","outDir": "dist",+ "strict": false,"types": ["node","express"diff --git a/apps/server/webpack.config.cjs b/apps/server/webpack.config.cjsdeleted file mode 100644index 6a5d7a05c9..0000000000--- a/apps/server/webpack.config.cjs+++ /dev/null@@ -1,69 +0,0 @@-const { NxAppWebpackPlugin } = require('@nx/webpack/app-plugin');-const CopyPlugin = require('copy-webpack-plugin');-const { join } = require('path');--const outputDir = join(__dirname, 'dist');--function buildFilesToCopy() {- const files = [];-- files.push({- from: "../client/dist",- to: join(outputDir, "public")- });-- const nodePaths = [- // Required as they are native dependencies and cannot be well bundled.- "better-sqlite3",- "bindings",- "file-uri-to-path"- ];-- for (const nodePath of nodePaths) {- files.push({- from: join("node_modules", nodePath),- to: join(outputDir, "node_modules", nodePath)- })- }-- return files;-}--module.exports = {- output: {- path: outputDir- },- module: {- rules: [- {- test: /\.css$/i,- type: "asset/source"- }- ]- },- plugins: [- new NxAppWebpackPlugin({- target: 'node',- compiler: 'tsc',- main: './src/main.ts',- tsConfig: './tsconfig.app.json',- assets: ["./src/assets"],- optimization: false,- outputHashing: 'none',- generatePackageJson: true,- additionalEntryPoints: [- "./src/docker_healthcheck.ts"- ],- externalDependencies: [- "electron/main",- "@electron/remote/main",- "electron",- "@electron/remote",- "better-sqlite3"- ]- }),- new CopyPlugin({- patterns: buildFilesToCopy()- })- ]-};diff --git a/tsconfig.base.json b/tsconfig.base.jsonindex 8b3d9492ff..87eba8adc4 100644--- a/tsconfig.base.json+++ b/tsconfig.base.json@@ -10,7 +10,7 @@"moduleResolution": "nodenext","noEmitOnError": true,"noFallthroughCasesInSwitch": true,- "noImplicitAny": true,+ "noImplicitAny": false, // TODO: Re-enable it at some point."noImplicitOverride": false, // TODO: Re-enable it at some point."noImplicitReturns": false, // TODO: Re-enable it at some point."noUnusedLocals": false, // TODO: Re-enable it at some point.