band aid fix for process is not defined

This commit is contained in:
Felix Roos 2023-12-15 11:33:35 +01:00
parent 505ad17447
commit 9fac2c3c33
4 changed files with 46 additions and 2 deletions

View file

@ -2,6 +2,7 @@ import { defineConfig } from 'vite';
import { dependencies } from './package.json';
import { resolve } from 'path';
// import { visualizer } from 'rollup-plugin-visualizer';
import replace from '@rollup/plugin-replace';
// https://vitejs.dev/config/
export default defineConfig({
@ -15,6 +16,12 @@ export default defineConfig({
},
rollupOptions: {
// external: [...Object.keys(dependencies)],
plugins: [
replace({
'process.env.NODE_ENV': JSON.stringify('production'),
preventAssignment: true,
}),
],
},
target: 'esnext',
},