Skip to content

Commit

Permalink
Merge pull request #45 from ar-io/fix-process-env
Browse files Browse the repository at this point in the history
fix: define process.env and process.version to prevent polyfill of process and use env values
  • Loading branch information
kunstmusik authored Jul 11, 2024
2 parents 611aa46 + e293a87 commit eb296d1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ import { sentryVitePlugin } from '@sentry/vite-plugin';
import react from '@vitejs/plugin-react';
import path from 'path';
import { defineConfig } from 'vite';
import svgr from 'vite-plugin-svgr';
import { nodePolyfills } from 'vite-plugin-node-polyfills';

import svgr from 'vite-plugin-svgr';

// https://vitejs.dev/config/
export default defineConfig({
Expand Down Expand Up @@ -38,6 +37,8 @@ export default defineConfig({
],
base: '',
define: {
'process.env': process.env,
'process.version': `"${process.version}"`,
VITE_CONFIG: {
version: JSON.stringify(process.env.npm_package_version),
},
Expand Down

0 comments on commit eb296d1

Please sign in to comment.