Skip to content

Commit

Permalink
fix: event reporting env vars (#570)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgresham authored May 13, 2024
1 parent f50aa94 commit bab4684
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion vite.renderer.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ import type { ConfigEnv, PluginOption, UserConfig } from 'vite';
import { defineConfig } from 'vite';
import { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin';
import svgr from "vite-plugin-svgr";

import dotenv from 'dotenv';
import { pluginExposeRenderer } from './vite.base.config.js';

// applies env vars from .env file(s)
dotenv.config();

console.log("vite.renderer.config.ts");

// https://vitejs.dev/config
Expand Down Expand Up @@ -33,5 +36,11 @@ export default defineConfig((env) => {
preserveSymlinks: true,
},
clearScreen: false,
define: {
'import.meta.env.MP_PROJECT_TOKEN': JSON.stringify(process.env.MP_PROJECT_TOKEN),
'import.meta.env.MP_PROJECT_ENV': JSON.stringify(process.env.MP_PROJECT_ENV),
'import.meta.env.NICENODE_ENV': JSON.stringify(process.env.NICENODE_ENV),
'import.meta.env.SENTRY_DSN': JSON.stringify(process.env.SENTRY_DSN),
}
} as UserConfig;
});

0 comments on commit bab4684

Please sign in to comment.