Skip to content

Commit c1b2217

Browse files
authored
fix(namadillo): removing unused .env injection on Vite config (#1127)
1 parent 81f6688 commit c1b2217

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

apps/namadillo/vite.config.mjs

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,11 @@
11
/* eslint-disable */
22
import react from "@vitejs/plugin-react";
3-
import { defineConfig, loadEnv } from "vite";
3+
import { defineConfig } from "vite";
44
import checker from "vite-plugin-checker";
55
import { nodePolyfills } from "vite-plugin-node-polyfills";
66
import tsconfigPaths from "vite-tsconfig-paths";
77

8-
export default defineConfig(({ mode }) => {
9-
const env = loadEnv(mode, process.cwd(), "");
10-
const filteredEnv = Object.keys(env).reduce((acc, current) => {
11-
if (current.startsWith("NAMADA_INTERFACE_")) {
12-
return {
13-
...acc,
14-
[current]: env[current],
15-
};
16-
}
17-
return acc;
18-
}, {});
19-
8+
export default defineConfig(() => {
209
return {
2110
plugins: [
2211
react(),
@@ -30,9 +19,6 @@ export default defineConfig(({ mode }) => {
3019
overlay: { initialIsOpen: false },
3120
}),
3221
],
33-
define: {
34-
"process.env": filteredEnv,
35-
},
3622
optimizeDeps: {
3723
esbuildOptions: {
3824
// Node.js global to browser globalThis

0 commit comments

Comments
 (0)