refactor(frontend): replace usage of process.env.NODE_ENV with import.meta.env.MODE
This commit is contained in:
@@ -21,7 +21,7 @@ import { CompartmentDependencyModule, PluginFactoryFunction, SandboxEnvironment,
|
||||
import { logError, logInfo } from './utils';
|
||||
|
||||
// Loads near membrane custom formatter for near membrane proxy objects.
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
if (import.meta.env.MODE !== 'production') {
|
||||
// @ts-ignore - this is aliased in vite config but ts complains because it cannot resolve it.
|
||||
import('@locker/near-membrane-dom/custom-devtools-formatter');
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ export function configureStore(initialState?: Partial<StoreState>) {
|
||||
iamApi.middleware,
|
||||
...extraMiddleware
|
||||
),
|
||||
devTools: process.env.NODE_ENV !== 'production',
|
||||
devTools: import.meta.env.MODE !== 'production',
|
||||
preloadedState: {
|
||||
navIndex: buildInitialState(),
|
||||
...initialState,
|
||||
|
||||
Vendored
+1
@@ -1 +1,2 @@
|
||||
/// <reference types="vite/client" />
|
||||
/// <reference types="vite/types/importMeta" />
|
||||
|
||||
Reference in New Issue
Block a user