diff --git a/packages/telemed-ehr/app/env/.env.local-template b/packages/telemed-ehr/app/env/.env.local-template index 8d9c123d..bdd38c5b 100644 --- a/packages/telemed-ehr/app/env/.env.local-template +++ b/packages/telemed-ehr/app/env/.env.local-template @@ -1,4 +1,4 @@ -PORT=4002 +VITE_APP_PORT=4002 VITE_APP_IS_LOCAL=true VITE_APP_ZAPEHR_APPLICATION_CLIENT_ID= VITE_APP_ZAPEHR_APPLICATION_DOMAIN=https://auth.zapehr.com diff --git a/packages/telemed-ehr/app/vite.config.ts b/packages/telemed-ehr/app/vite.config.ts index 9fd133c2..bc58f1b1 100644 --- a/packages/telemed-ehr/app/vite.config.ts +++ b/packages/telemed-ehr/app/vite.config.ts @@ -7,7 +7,7 @@ import * as path from 'path'; export default ({ mode }) => { const envDir = './env'; - const env = loadEnv(mode, path.join(process.cwd(), envDir), ''); + const env = loadEnv(mode, path.join(process.cwd(), envDir)); return defineConfig({ envDir: envDir, @@ -15,7 +15,7 @@ export default ({ mode }) => { plugins: [react(), viteTsconfigPaths(), svgr()], server: { open: true, - port: env.PORT ? parseInt(env.PORT) : undefined, + port: env.VITE_APP_PORT ? parseInt(env.VITE_APP_PORT) : undefined, }, build: { outDir: './build', diff --git a/packages/telemed-intake/app/env/.env.local-template b/packages/telemed-intake/app/env/.env.local-template index b2af4bd7..c1b2b018 100644 --- a/packages/telemed-intake/app/env/.env.local-template +++ b/packages/telemed-intake/app/env/.env.local-template @@ -1,4 +1,4 @@ -PORT=3002 +VITE_APP_PORT=3002 VITE_APP_IS_LOCAL=true VITE_APP_CLIENT_ID= VITE_APP_AUTH0_AUDIENCE='https://api.zapehr.com' diff --git a/packages/telemed-intake/app/vite.config.ts b/packages/telemed-intake/app/vite.config.ts index 36689ae2..3b97c3cc 100644 --- a/packages/telemed-intake/app/vite.config.ts +++ b/packages/telemed-intake/app/vite.config.ts @@ -6,7 +6,7 @@ import config from '../../../vite.config'; export default (env) => { const { mode } = env; const envDir = './env'; - const appEnv = loadEnv(mode, path.join(process.cwd(), envDir), ''); + const appEnv = loadEnv(mode, path.join(process.cwd(), envDir)); const shouldUploadSentrySourceMaps = mode === 'testing' || mode === 'staging' || mode === 'dev' || mode === 'production' || mode === 'training'; diff --git a/packages/utils/vite.config.ts b/packages/utils/vite.config.ts index 5a891c01..076718e1 100644 --- a/packages/utils/vite.config.ts +++ b/packages/utils/vite.config.ts @@ -14,7 +14,4 @@ export default defineConfig({ formats: ['es'], }, }, - define: { - 'process.env': process.env, - }, }); diff --git a/vite.config.ts b/vite.config.ts index 8b7f48f7..800befb0 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -10,7 +10,7 @@ dotenv.config(); export default ({ mode }) => { const envDir = './env'; - const env = loadEnv(mode, path.join(process.cwd(), envDir), ''); + const env = loadEnv(mode, path.join(process.cwd(), envDir)); return defineConfig({ envDir: envDir, @@ -18,7 +18,7 @@ export default ({ mode }) => { plugins: [react(), viteTsconfigPaths(), svgr()], server: { open: true, - port: env.PORT ? parseInt(env.PORT) : undefined, + port: env.VITE_APP_PORT ? parseInt(env.VITE_APP_PORT) : undefined, }, optimizeDeps: { exclude: ['js-big-decimal', 'jsonpath-plus'], @@ -30,8 +30,5 @@ export default ({ mode }) => { external: ['jsonpath-plus'], }, }, - define: { - 'process.env': process.env, - }, }); };