From d90c5739432c760308b9d75a90da21d3a0a0049c Mon Sep 17 00:00:00 2001 From: Giddh's Black Tiger Date: Thu, 23 Apr 2026 17:07:32 +0530 Subject: [PATCH] refactor: remove app/index.html copy logic from postbuild script - Remove code that copies index.html to app/index.html directory - Remove base href enforcement logic for app shell - Simplify postbuild completion logging --- tools/postbuild.js | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/tools/postbuild.js b/tools/postbuild.js index 2603c8d9..09e8281e 100644 --- a/tools/postbuild.js +++ b/tools/postbuild.js @@ -72,21 +72,7 @@ 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'); - const appShellDir = path.join(__dirname, rootDirectiory, 'app'); - const appShellPath = path.join(appShellDir, 'index.html'); - - if (fs.existsSync(csrHtmlPath)) { - if (!fs.existsSync(appShellDir)) { - fs.mkdirSync(appShellDir, { recursive: true }); - } - fs.copyFileSync(csrHtmlPath, appShellPath); - console.log(`Copied index.csr.html → app/index.html`); - } else { - console.log('index.csr.html not found, skipping app/index.html copy'); - } + console.log('Post-build tasks complete'); }) .catch((err) => { console.log('Error with post build:', err);