fix: wdyr error with vite

This commit is contained in:
Ahmed Bouhuolia
2025-11-25 21:34:17 +02:00
parent adfa8852db
commit dc6cf13a3e

View File

@@ -1,8 +1,8 @@
import React from 'react';
import whyDidYouRender from '@welldone-software/why-did-you-render';
if (process.env.NODE_ENV === 'development') {
import('@welldone-software/why-did-you-render').then(({ default: whyDidYouRender }) => {
if (whyDidYouRender) {
whyDidYouRender(React, { trackAllPureComponents: false });
}
whyDidYouRender(React, {
trackAllPureComponents: true,
});
}