From c2d3b45bf48ff3f401948b499227763912e2474b Mon Sep 17 00:00:00 2001 From: kay delaney <45561153+kaydelaney@users.noreply.github.com> Date: Mon, 8 Aug 2022 15:33:49 +0100 Subject: [PATCH] Chore: Make "why-did-you-render" a dynamic import (#53121) --- public/app/dev.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/app/dev.ts b/public/app/dev.ts index 101a89ff4bb..f228e80715a 100644 --- a/public/app/dev.ts +++ b/public/app/dev.ts @@ -1,9 +1,9 @@ import React from 'react'; -export function initDevFeatures() { +export async function initDevFeatures() { // if why-render is in url enable why did you render react extension if (window.location.search.indexOf('why-render') !== -1) { - const whyDidYouRender = require('@welldone-software/why-did-you-render'); + const { default: whyDidYouRender } = await import('@welldone-software/why-did-you-render'); whyDidYouRender(React, { trackAllPureComponents: true, });