From c3a0c5427d3d33e375995fa4af7d8ecb21676848 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Wed, 23 Apr 2025 09:32:47 +0300 Subject: [PATCH] chore(nx/client): set up entrypoints --- .../apps/client/webpack.config.ts | 10 +------ apps/client/src/index.ts | 0 apps/client/webpack.config.js | 29 ++++++++++++++++++- 3 files changed, 29 insertions(+), 10 deletions(-) create mode 100644 apps/client/src/index.ts diff --git a/_regroup_monorepo/apps/client/webpack.config.ts b/_regroup_monorepo/apps/client/webpack.config.ts index 6e4166ed3..029018b94 100644 --- a/_regroup_monorepo/apps/client/webpack.config.ts +++ b/_regroup_monorepo/apps/client/webpack.config.ts @@ -9,15 +9,7 @@ import CopyPlugin from "copy-webpack-plugin"; const rootDir = path.dirname(fileURLToPath(import.meta.url)); const config: Configuration = { mode: "production", - entry: { - setup: "./src/setup.js", - login: "./src/login.js", - mobile: "./src/mobile.js", - desktop: "./src/desktop.js", - share: "./src/share.js", - // TriliumNextTODO: integrate set_password into setup entry point/view - set_password: "./src/set_password.js" - }, + entry: {}, output: { publicPath: `${assetPath}/app-dist/`, path: path.resolve(rootDir, "build"), diff --git a/apps/client/src/index.ts b/apps/client/src/index.ts new file mode 100644 index 000000000..e69de29bb diff --git a/apps/client/webpack.config.js b/apps/client/webpack.config.js index f430b81bf..8a879e40a 100644 --- a/apps/client/webpack.config.js +++ b/apps/client/webpack.config.js @@ -13,7 +13,34 @@ module.exports = { new NxAppWebpackPlugin({ tsConfig: './tsconfig.app.json', compiler: 'swc', - main: './src/desktop.ts', + main: "./src/index.ts", + additionalEntryPoints: [ + { + entryName: "desktop", + entryPath: "./src/desktop.ts" + }, + { + entryName: "mobile", + entryPath: "./src/mobile.ts" + }, + { + entryName: "login", + entryPath: "./src/login.ts" + }, + { + entryName: "setup", + entryPath: "./src/setup.ts" + }, + { + entryName: "share", + entryPath: "./src/share.ts" + }, + { + // TriliumNextTODO: integrate set_password into setup entry point/view + entryName: "set_password", + entryPath: "./src/set_password.ts" + } + ], baseHref: '/', assets: ["./src/assets"], styles: [],