Skip to content

Build your personal knowledge base with Trilium Notes

entrypoint: add missing, currently required set_password entry point

Panagiotis Papadopoulosf6d9b429110d
diff --git a/src/public/app/set_password.ts b/src/public/app/set_password.ts
new file mode 100644
index 0000000000..ebf6b68a48
--- /dev/null
+++ b/src/public/app/set_password.ts
@@ -0,0 +1,6 @@
+import "../stylesheets/bootstrap.scss";
+
+// @TriliumNextTODO: is this even needed anymore?
+// @ts-ignore - module = undefined
+// Required for correct loading of scripts in Electron
+if (typeof module === 'object') {window.module = module; module = undefined;}
diff --git a/src/views/set_password.ejs b/src/views/set_password.ejs
index 9b958f79f3..7ad7900a70 100644
--- a/src/views/set_password.ejs
+++ b/src/views/set_password.ejs
@@ -45,9 +45,7 @@
</div>
</div>
-<script>
- // Required for correct loading of scripts in Electron
- if (typeof module === 'object') {window.module = module; module = undefined;}
-</script>
+<script src="<%= appPath %>/set_password.js" crossorigin type="module"></script>
+
</body>
</html>
diff --git a/webpack.config.ts b/webpack.config.ts
index faaf000f2a..69a22c7c3e 100644
--- a/webpack.config.ts
+++ b/webpack.config.ts
@@ -12,7 +12,9 @@ const config: Configuration = {
setup: "./src/public/app/setup.js",
mobile: "./src/public/app/mobile.js",
desktop: "./src/public/app/desktop.js",
- share: "./src/public/app/share.js"
+ share: "./src/public/app/share.js",
+ // TriliumNextTODO: integrate set_password into setup entry point/view
+ set_password: "./src/public/app/set_password.js"
},
output: {
publicPath: `${assetPath}/app-dist/`,