From 5b9d5bbde20f389116bff6a713e57bd373a9ab44 Mon Sep 17 00:00:00 2001 From: Ryan Christian <33403762+rschristian@users.noreply.github.com> Date: Mon, 11 Dec 2023 00:54:04 -0600 Subject: [PATCH] Bump `source-map` for Node 18 & fix `/200.html` being prerendered (#1811) * fix: Bump `source-map` to fix poor env detection * fix: Shouldn't be prerendering `/200.html` --- packages/cli/package.json | 2 +- packages/cli/src/lib/webpack/render-html-plugin.js | 7 ++++--- yarn.lock | 7 ++++++- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/packages/cli/package.json b/packages/cli/package.json index 1a45b920c..b827ef8a2 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -73,7 +73,7 @@ "react-refresh": "0.11.0", "sade": "^1.8.1", "size-plugin": "^2.0.2", - "source-map": "^0.7.2", + "source-map": "^0.7.4", "source-map-loader": "^1.1.1", "stack-trace": "0.0.10", "style-loader": "^3.3.1", diff --git a/packages/cli/src/lib/webpack/render-html-plugin.js b/packages/cli/src/lib/webpack/render-html-plugin.js index c3f37cefb..07bd497cd 100644 --- a/packages/cli/src/lib/webpack/render-html-plugin.js +++ b/packages/cli/src/lib/webpack/render-html-plugin.js @@ -142,9 +142,10 @@ module.exports = async function renderHTMLPlugin(config, env) { env, prerenderData: values, CLI_DATA: { prerenderData: { url, ...routeData } }, - ssr: config.prerender - ? await prerender(config, values) - : '', + ssr: + config.prerender && url !== PREACT_FALLBACK_URL + ? await prerender(config, values) + : '', entrypoints, }, htmlWebpackPlugin: { diff --git a/yarn.lock b/yarn.lock index 691863212..02ba26692 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10887,11 +10887,16 @@ source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== -source-map@^0.7.2, source-map@^0.7.3, source-map@~0.7.2: +source-map@^0.7.3, source-map@~0.7.2: version "0.7.3" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383" integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ== +source-map@^0.7.4: + version "0.7.4" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.4.tgz#a9bbe705c9d8846f4e08ff6765acf0f1b0898656" + integrity sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA== + source-map@^0.8.0-beta.0: version "0.8.0-beta.0" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.8.0-beta.0.tgz#d4c1bb42c3f7ee925f005927ba10709e0d1d1f11"