Skip to content

Commit

Permalink
refactor: update method to create process obj
Browse files Browse the repository at this point in the history
  • Loading branch information
frazarshad committed Jun 7, 2024
1 parent a97a2d0 commit bd51aa4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
8 changes: 6 additions & 2 deletions packages/example/src/installSesLockdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@ import '@endo/eventual-send/shim.js';
import { Buffer } from 'buffer';

globalThis.Buffer = Buffer;
const consoleTaming = import.meta.env.PROD ? 'safe' : 'unsafe';

// @ts-expect-error Add process to context for cosmos-kit
globalThis.process = { env: import.meta.env };

const consoleTaming = import.meta.env.PROD ? 'safe' : 'unsafe';

lockdown({
errorTaming: 'unsafe',
overrideTaming: 'severe',
consoleTaming,
});

Error.stackTraceLimit = Infinity;
Error.stackTraceLimit = Infinity;
14 changes: 5 additions & 9 deletions packages/example/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
import { defineConfig, loadEnv } from 'vite'
import react from '@vitejs/plugin-react'
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';

// https://vitejs.dev/config/
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), '');
export default defineConfig(() => {
return {
define: {
'process.env': env
},
plugins: [react()],
}
})
};
});

0 comments on commit bd51aa4

Please sign in to comment.