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
docker: Fix webpack
Elian Doran0a7fcf399fb8
diff --git a/bin/copy-trilium.sh b/bin/copy-trilium.shindex 9fdfe0293f..79b823e31a 100755--- a/bin/copy-trilium.sh+++ b/bin/copy-trilium.sh@@ -24,7 +24,7 @@ donefor f in 'package.json' 'package-lock.json' 'README.md' 'LICENSE' 'config-sample.ini' 'electron.js'; docp "$f" "$DIR"/done-cp webpack-* "$DIR"/ # here warning because there is no 'webpack-*', but webpack.config.js only+cp webpack-* "$DIR"/ # here warning because there is no 'webpack-*', but webpack.config.ts only# run in subshell (so we return to original dir)(cd $DIR && n exec 18.18.2 npm install --only=prod)diff --git a/package.json b/package.jsonindex e37e6204cc..e48bff6c27 100644--- a/package.json+++ b/package.json@@ -27,7 +27,7 @@"build-backend-docs": "rm -rf ./docs/backend_api && ./node_modules/.bin/jsdoc -c jsdoc-conf.json -d ./docs/backend_api src/becca/entities/*.js src/services/backend_script_api.js src/services/sql.js","build-frontend-docs": "rm -rf ./docs/frontend_api && ./node_modules/.bin/jsdoc -c jsdoc-conf.json -d ./docs/frontend_api src/public/app/entities/*.js src/public/app/services/frontend_script_api.js src/public/app/widgets/basic_widget.js src/public/app/widgets/note_context_aware_widget.js src/public/app/widgets/right_panel_widget.js","build-docs": "npm run build-backend-docs && npm run build-frontend-docs",- "webpack": "webpack -c webpack.config.js",+ "webpack": "webpack -c webpack.config.ts","test-jasmine": "TRILIUM_DATA_DIR=~/trilium/data-test jasmine","test-es6": "node -r esm spec-es6/attribute_parser.spec.js ","test": "npm run test-jasmine && npm run test-es6",diff --git a/webpack.config.js b/webpack.config.tssimilarity index 80%rename from webpack.config.jsrename to webpack.config.tsindex 2e3bd7b17c..6f266033c7 100644--- a/webpack.config.js+++ b/webpack.config.ts@@ -1,10 +1,10 @@const path = require('path');-const assetPath = require('./src/services/asset_path');+import assetPath = require('./src/services/asset_path');module.exports = {mode: 'production',entry: {- setup: './src/public/app/setup.ts',+ setup: './src/public/app/setup.js',mobile: './src/public/app/mobile.js',desktop: './src/public/app/desktop.js',},