From f5db27396a63a5ac55039ab66116a5ffbb936217 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Wed, 16 Jul 2025 20:28:14 -0400 Subject: [PATCH] chore: Patch `prop-types` default export (#9656) * chore: Patch prop-types default export * touch --- app/index.tsx | 1 + patches/prop-types+15.8.1.patch | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 patches/prop-types+15.8.1.patch diff --git a/app/index.tsx b/app/index.tsx index ede59695e2..82f7822624 100644 --- a/app/index.tsx +++ b/app/index.tsx @@ -88,6 +88,7 @@ window.addEventListener("load", async () => { if (!env.GOOGLE_ANALYTICS_ID || !window.ga) { return; } + // https://github.com/googleanalytics/autotrack/issues/137#issuecomment-305890099 await import("autotrack/autotrack.js"); window.ga("require", "outboundLinkTracker"); diff --git a/patches/prop-types+15.8.1.patch b/patches/prop-types+15.8.1.patch new file mode 100644 index 0000000000..a6a0dd69b0 --- /dev/null +++ b/patches/prop-types+15.8.1.patch @@ -0,0 +1,11 @@ +diff --git a/node_modules/prop-types/index.js b/node_modules/prop-types/index.js +index e9ef51d..b68512a 100644 +--- a/node_modules/prop-types/index.js ++++ b/node_modules/prop-types/index.js +@@ -17,3 +17,6 @@ if (process.env.NODE_ENV !== 'production') { + // http://fb.me/prop-types-in-prod + module.exports = require('./factoryWithThrowingShims')(); + } ++ ++// ESM default export compatibility for bundlers like rolldown-vite ++module.exports.default = module.exports;