chore(nx/client): set up entrypoints

This commit is contained in:
Elian Doran 2025-04-23 09:32:47 +03:00
parent f89eb8cfd9
commit c3a0c5427d
No known key found for this signature in database
3 changed files with 29 additions and 10 deletions

View File

@ -9,15 +9,7 @@ import CopyPlugin from "copy-webpack-plugin";
const rootDir = path.dirname(fileURLToPath(import.meta.url)); const rootDir = path.dirname(fileURLToPath(import.meta.url));
const config: Configuration = { const config: Configuration = {
mode: "production", mode: "production",
entry: { 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"
},
output: { output: {
publicPath: `${assetPath}/app-dist/`, publicPath: `${assetPath}/app-dist/`,
path: path.resolve(rootDir, "build"), path: path.resolve(rootDir, "build"),

0
apps/client/src/index.ts Normal file
View File

View File

@ -13,7 +13,34 @@ module.exports = {
new NxAppWebpackPlugin({ new NxAppWebpackPlugin({
tsConfig: './tsconfig.app.json', tsConfig: './tsconfig.app.json',
compiler: 'swc', 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: '/', baseHref: '/',
assets: ["./src/assets"], assets: ["./src/assets"],
styles: [], styles: [],