File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -20,10 +20,11 @@ import { start } from "./start";
2020import type { RegisterLink , RegisteredLinkProps } from "./link" ;
2121import { setLink } from "./link" ;
2222import { setUseLang } from "./i18n" ;
23- import Script from "next/script" ;
2423import { assert } from "tsafe/assert" ;
2524import "./assets/dsfr_plus_icons.css" ;
2625
26+ const isProduction = process . env . NODE_ENV !== "development" ;
27+
2728export type { RegisterLink , RegisteredLinkProps } ;
2829
2930export type CreateNextDsfrIntegrationApiParams = {
@@ -175,11 +176,13 @@ export function createNextDsfrIntegrationApi(
175176 />
176177 </ >
177178 ) }
178- < Script
179- dangerouslySetInnerHTML = { {
180- "__html" : getScriptToRunAsap ( defaultColorScheme )
181- } }
182- />
179+ { isProduction && (
180+ < script
181+ dangerouslySetInnerHTML = { {
182+ "__html" : getScriptToRunAsap ( defaultColorScheme )
183+ } }
184+ />
185+ ) }
183186 </ Head >
184187 { isBrowser ? (
185188 < App { ...( props as any ) } />
You can’t perform that action at this time.
0 commit comments