R: Remove react-scan from prod
Some checks failed
Frontend CI / build (22.x) (push) Has been cancelled
Some checks failed
Frontend CI / build (22.x) (push) Has been cancelled
This commit is contained in:
parent
ad5a97b844
commit
6e1d99122e
|
@ -1,15 +1,16 @@
|
||||||
import { createRoot } from 'react-dom/client';
|
import { createRoot } from 'react-dom/client';
|
||||||
import { scan } from 'react-scan';
|
|
||||||
|
|
||||||
import { GlobalProviders } from './app/GlobalProviders';
|
import { GlobalProviders } from './app/GlobalProviders';
|
||||||
import { App } from './app';
|
import { App } from './app';
|
||||||
|
|
||||||
import './index.css';
|
import './index.css';
|
||||||
|
|
||||||
if (typeof window !== 'undefined') {
|
if (typeof window !== 'undefined' && !!process.env.NODE_ENV && process.env.NODE_ENV === 'development') {
|
||||||
scan({
|
void import('react-scan').then(module =>
|
||||||
enabled: !!process.env.NODE_ENV && process.env.NODE_ENV === 'development'
|
module.scan({
|
||||||
});
|
enabled: true
|
||||||
|
})
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
createRoot(document.getElementById('root')!).render(
|
createRoot(document.getElementById('root')!).render(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user