From 013a38ca98d74e02d5eb52b021b62ff8e65999f5 Mon Sep 17 00:00:00 2001 From: sebseb7 Date: Mon, 1 Dec 2025 12:50:41 +0100 Subject: [PATCH] fix: update caniuse-lite version and enhance SPA routing for resetPassword - Updated caniuse-lite to version 1.0.30001757 in package-lock.json for improved compatibility. - Added functionality to copy index.html to the resetPassword directory for better SPA routing in production environments. --- package-lock.json | 6 +++--- prerender.cjs | 8 ++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index a4f5eae..689d4fa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4554,9 +4554,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001727", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001727.tgz", - "integrity": "sha512-pB68nIHmbN6L/4C6MH1DokyR3bYqFwjaSs/sWDHGj4CTcFtQUQMuJftVwWkXq7mNWOybD3KhUv3oWHoGxgP14Q==", + "version": "1.0.30001757", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001757.tgz", + "integrity": "sha512-r0nnL/I28Zi/yjk1el6ilj27tKcdjLsNqAOZr0yVjWPrSQyHgKI2INaEWw21bAQSv2LXRt1XuCS/GomNpWOxsQ==", "dev": true, "funding": [ { diff --git a/prerender.cjs b/prerender.cjs index 7faecd2..be6ae26 100644 --- a/prerender.cjs +++ b/prerender.cjs @@ -422,6 +422,14 @@ const renderApp = async (categoryData, socket) => { process.exit(1); } + // Copy index.html to resetPassword (no file extension) for SPA routing + if (config.isProduction) { + const indexPath = path.resolve(__dirname, config.outputDir, "index.html"); + const resetPasswordPath = path.resolve(__dirname, config.outputDir, "resetPassword"); + fs.copyFileSync(indexPath, resetPasswordPath); + console.log(`āœ… Copied index.html to ${resetPasswordPath}`); + } + // Render static pages console.log("\nšŸ“„ Rendering static pages...");