diff --git a/apps/web/.env-cmdrc.js b/apps/web/.env-cmdrc.js index b9dad8075..5af167869 100644 --- a/apps/web/.env-cmdrc.js +++ b/apps/web/.env-cmdrc.js @@ -18,15 +18,14 @@ module.exports = { }, all: { UV_THREADPOOL_SIZE: IS_CI ? NUM_CPUS : 2, - GENERATE_SOURCEMAP: false, + GENERATE_SOURCEMAP: process.env.NODE_ENV !== "production", INLINE_RUNTIME_CHUNK: false, DISABLE_ESLINT_PLUGIN: true, REACT_APP_GIT_HASH: gitHash, REACT_APP_VERSION: APP_VERSION }, dev: { - REACT_APP_LOCALHOST: ip.address(), - REACT_APP_CI: "true" + REACT_APP_LOCALHOST: ip.address() }, web: { REACT_APP_PLATFORM: "web" diff --git a/apps/web/src/components/dialogs/onboarding-dialog.js b/apps/web/src/components/dialogs/onboarding-dialog.js index db92060c2..8163ec7f7 100644 --- a/apps/web/src/components/dialogs/onboarding-dialog.js +++ b/apps/web/src/components/dialogs/onboarding-dialog.js @@ -122,8 +122,6 @@ const onboarding = { }; export function interruptedOnboarding() { - if (process.env.NODE_ENV === "development" || isTesting()) return; - for (let key in onboarding) { const index = Config.get(key, undefined); if (index >= 0 && index < onboarding[key].length - 1) return key; diff --git a/apps/web/src/hooks/use-database.js b/apps/web/src/hooks/use-database.js index fefbd2100..90150fbbe 100644 --- a/apps/web/src/hooks/use-database.js +++ b/apps/web/src/hooks/use-database.js @@ -37,8 +37,7 @@ export default function useDatabase(persistence) { (async () => { await import("../app.css"); - if (process.env.NODE_ENV !== "development") - await initializeDatabase(persistence); + await initializeDatabase(persistence); setIsAppLoaded(true); memory.isAppLoaded = true; })(); diff --git a/apps/web/src/hooks/use-is-user-premium.js b/apps/web/src/hooks/use-is-user-premium.js index 6f63733e1..4b56fd691 100644 --- a/apps/web/src/hooks/use-is-user-premium.js +++ b/apps/web/src/hooks/use-is-user-premium.js @@ -29,7 +29,6 @@ export function useIsUserPremium() { } export function isUserPremium(user) { - if (process.env.REACT_APP_CI) return true; if (!user) user = userstore.get().user; const subStatus = user?.subscription?.type; diff --git a/apps/web/src/index.tsx b/apps/web/src/index.tsx index 4a25ce02f..b529b9494 100644 --- a/apps/web/src/index.tsx +++ b/apps/web/src/index.tsx @@ -142,15 +142,7 @@ function isSessionExpired(path: Routes): RouteWithPath | null { return null; } -if (process.env.NODE_ENV === "development") { - (async function dev() { - const { initializeDatabase } = await import("./common/db"); - await initializeDatabase(); - renderApp(); - })(); -} else { - renderApp(); -} +renderApp(); async function renderApp() { const {