diff --git a/package-lock.json b/package-lock.json index 171b942..f080db2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -63,6 +63,7 @@ "tailwindcss": "^3.4.14", "typescript": "^5.6.3", "vite-plugin-checker": "^0.7.2", + "vite-plugin-environment": "^1.1.3", "vite-plugin-node-polyfills": "^0.22.0", "vue-eslint-parser": "^9.4.3", "vue-tsc": "^2.0.29" @@ -19277,6 +19278,16 @@ "node": ">= 12" } }, + "node_modules/vite-plugin-environment": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/vite-plugin-environment/-/vite-plugin-environment-1.1.3.tgz", + "integrity": "sha512-9LBhB0lx+2lXVBEWxFZC+WO7PKEyE/ykJ7EPWCq95NEcCpblxamTbs5Dm3DLBGzwODpJMEnzQywJU8fw6XGGGA==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "vite": ">= 2.7" + } + }, "node_modules/vite-plugin-node-polyfills": { "version": "0.22.0", "dev": true, diff --git a/quasar.config.js b/quasar.config.js index b0f5bd4..04b86c0 100644 --- a/quasar.config.js +++ b/quasar.config.js @@ -74,10 +74,7 @@ module.exports = configure(function (ctx) { viteConf.plugins = [ ...viteConf.plugins, nodePolyfills(), - EnvironmentPlugin('all', { - prefix: 'APP.', - defineOn: 'import.meta.env', - }), + EnvironmentPlugin('all', { defineOn: 'import.meta.env' }), ]; if (ctx.dev) { viteConf.define['process.browser'] = true; diff --git a/src/config/env.ts b/src/config/env.ts index bf2223f..3f52b14 100644 --- a/src/config/env.ts +++ b/src/config/env.ts @@ -13,14 +13,6 @@ const envSchema = z.object({ WAGMI_BASE_ID: z.union([z.literal(base.id), z.literal(baseSepolia.id)]).default(base.id), }); -const env = envSchema.parse( - Object.keys(import.meta.env).reduce( - (acc, key) => ({ - ...acc, - ...{ [key.replace('APP.', '')]: import.meta.env[key] }, - }), - {}, - ), -); +const env = envSchema.parse(import.meta.env); export default env;