From 935e68737335159e1a8593d4594ef9151ec274c3 Mon Sep 17 00:00:00 2001 From: Johan Girod Date: Mon, 11 Jan 2021 12:09:00 +0100 Subject: [PATCH] :art: corrige la modale en prod --- mon-entreprise/source/site/entry.en.tsx | 4 ++++ mon-entreprise/source/site/entry.fr.tsx | 4 ++++ mon-entreprise/source/types/app-env.d.ts | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/mon-entreprise/source/site/entry.en.tsx b/mon-entreprise/source/site/entry.en.tsx index 6ea80221e..e357a387d 100644 --- a/mon-entreprise/source/site/entry.en.tsx +++ b/mon-entreprise/source/site/entry.en.tsx @@ -1,3 +1,7 @@ +// We disable Speedy mode for Styled-Component in production because it created a bug for overlay appearance +// https://stackoverflow.com/questions/53486470/react-styled-components-stripped-out-from-production-build +global.SC_DISABLE_SPEEDY = true + import 'core-js/stable' import { hot } from 'react-hot-loader/root' import { render } from 'react-dom' diff --git a/mon-entreprise/source/site/entry.fr.tsx b/mon-entreprise/source/site/entry.fr.tsx index dc8daf1d0..496b24d28 100644 --- a/mon-entreprise/source/site/entry.fr.tsx +++ b/mon-entreprise/source/site/entry.fr.tsx @@ -1,3 +1,7 @@ +// We disable Speedy mode for Styled-Component in production because it created a bug for overlay appearance +// https://stackoverflow.com/questions/53486470/react-styled-components-stripped-out-from-production-build +global.SC_DISABLE_SPEEDY = true + import { hot } from 'react-hot-loader/root' import 'core-js/stable' import 'react-hot-loader' diff --git a/mon-entreprise/source/types/app-env.d.ts b/mon-entreprise/source/types/app-env.d.ts index 59e04ecf6..bd0d28790 100644 --- a/mon-entreprise/source/types/app-env.d.ts +++ b/mon-entreprise/source/types/app-env.d.ts @@ -15,4 +15,8 @@ declare namespace NodeJS { DEEPL_API_SECRET: string INSEE_SIRENE_API_SECRET: string } + + interface Global { + SC_DISABLE_SPEEDY: boolean + } }