diff --git a/apps/36-blocks/project.json b/apps/36-blocks/project.json
index ef93ea4c..62a7c035 100644
--- a/apps/36-blocks/project.json
+++ b/apps/36-blocks/project.json
@@ -19,11 +19,6 @@
"outputPath": "dist/apps/36-blocks",
"index": "apps/36-blocks/src/index.html",
"browser": "apps/36-blocks/src/main.ts",
- "server": "apps/36-blocks/src/main.server.ts",
- "prerender": true,
- "ssr": {
- "entry": "apps/36-blocks/src/server.ts"
- },
"polyfills": ["zone.js"],
"tsConfig": "apps/36-blocks/tsconfig.app.json",
"inlineStyleLanguage": "scss",
diff --git a/apps/36-blocks/src/app/app.config.server.ts b/apps/36-blocks/src/app/app.config.server.ts
index 307a67f3..0436fd6f 100644
--- a/apps/36-blocks/src/app/app.config.server.ts
+++ b/apps/36-blocks/src/app/app.config.server.ts
@@ -1,8 +1,6 @@
import { ApplicationConfig } from '@angular/core';
-import { provideServerRendering, withRoutes } from '@angular/ssr';
import { PERSISTENCE } from '@angular/fire/compat/auth';
-import { serverRoutes } from './app.routes.server';
export const config: ApplicationConfig = {
- providers: [provideServerRendering(withRoutes(serverRoutes)), { provide: PERSISTENCE, useValue: 'none' }],
+ providers: [{ provide: PERSISTENCE, useValue: 'none' }],
};
diff --git a/apps/36-blocks/src/app/app.routes.server.ts b/apps/36-blocks/src/app/app.routes.server.ts
index d8821210..11ea7c52 100644
--- a/apps/36-blocks/src/app/app.routes.server.ts
+++ b/apps/36-blocks/src/app/app.routes.server.ts
@@ -1,26 +1,6 @@
import { RenderMode, ServerRoute } from '@angular/ssr';
export const serverRoutes: ServerRoute[] = [
- {
- path: '',
- renderMode: RenderMode.Prerender,
- },
- {
- path: 'app/**',
- renderMode: RenderMode.Client,
- },
- {
- path: 'widget-preview/**',
- renderMode: RenderMode.Client,
- },
- {
- path: 'project',
- renderMode: RenderMode.Client,
- },
- {
- path: 'client/**',
- renderMode: RenderMode.Client,
- },
{
path: '**',
renderMode: RenderMode.Client,
diff --git a/apps/36-blocks/tsconfig.app.json b/apps/36-blocks/tsconfig.app.json
index 04923602..dbbf8ab4 100644
--- a/apps/36-blocks/tsconfig.app.json
+++ b/apps/36-blocks/tsconfig.app.json
@@ -4,7 +4,7 @@
"outDir": "../../dist/out-tsc",
"types": ["node"]
},
- "files": ["src/main.ts", "src/main.server.ts", "src/server.ts"],
+ "files": ["src/main.ts"],
"include": ["src/**/*.d.ts"],
"exclude": ["jest.config.ts", "**/*.test.ts", "**/*.spec.ts"]
}
diff --git a/package.json b/package.json
index a820ad81..0959de66 100755
--- a/package.json
+++ b/package.json
@@ -67,9 +67,7 @@
"@angular/material-moment-adapter": "21.2.2",
"@angular/platform-browser": "21.2.4",
"@angular/platform-browser-dynamic": "21.2.4",
- "@angular/platform-server": "^21.2.4",
"@angular/router": "21.2.4",
- "@angular/ssr": "^21.2.2",
"@highcharts/map-collection": "2.0.1",
"@materia-ui/ngx-monaco-editor": "6.0.0",
"@ngrx/component": "21.0.1",
@@ -100,7 +98,6 @@
"d3-transition": "3.0.1",
"dayjs": "1.11.7",
"echarts": "^6.0.0",
- "express": "^5.2.1",
"firebase": "^12.10.0",
"froala-editor": "4.0.15",
"fs-extra": "5.0.0",
@@ -147,7 +144,6 @@
"@nx/workspace": "21.6.10",
"@schematics/angular": "21.2.2",
"@types/chart.js": "^2.9.28",
- "@types/express": "^5.0.6",
"@types/jest": "29.5.14",
"@types/lodash": "^4.14.161",
"@types/lodash-es": "^4.17.3",
diff --git a/tools/postbuild.js b/tools/postbuild.js
index 2603c8d9..dde85448 100644
--- a/tools/postbuild.js
+++ b/tools/postbuild.js
@@ -72,20 +72,29 @@ readDir(path.join(__dirname, rootDirectiory))
});
})
.then(() => {
- // Copy index.csr.html → app/index.html so static hosts (Amplify, S3, Nginx)
- // can route /app/* to a clean Angular shell instead of the prerendered home page.
- const csrHtmlPath = path.join(__dirname, rootDirectiory, 'index.csr.html');
+ // Copy index.html → app/index.html so static hosts (Amplify, S3, Nginx)
+ // can route /app/* to the CSR Angular shell.
+ // With SSR/prerender disabled the build outputs index.html directly (no index.csr.html).
+ const distIndexPath = path.join(__dirname, rootDirectiory, 'index.html');
const appShellDir = path.join(__dirname, rootDirectiory, 'app');
const appShellPath = path.join(appShellDir, 'index.html');
- if (fs.existsSync(csrHtmlPath)) {
+ if (fs.existsSync(distIndexPath)) {
if (!fs.existsSync(appShellDir)) {
fs.mkdirSync(appShellDir, { recursive: true });
}
- fs.copyFileSync(csrHtmlPath, appShellPath);
- console.log(`Copied index.csr.html → app/index.html`);
+
+ let appShellHtml = fs.readFileSync(distIndexPath, 'utf8');
+
+ // Force base href to "/" so JS chunks load from the root, not from /app/
+ if (!appShellHtml.includes('')) {
+ appShellHtml = appShellHtml.replace(//i, '');
+ }
+
+ fs.writeFileSync(appShellPath, appShellHtml);
+ console.log(`Copied index.html → app/index.html (base href enforced)`);
} else {
- console.log('index.csr.html not found, skipping app/index.html copy');
+ console.log('index.html not found, skipping app/index.html copy');
}
})
.catch((err) => {