From 71dc5fd18bda384ef84ebbcd122381fe59af16b1 Mon Sep 17 00:00:00 2001 From: alex8088 <244096523@qq.com> Date: Mon, 8 Aug 2022 19:14:08 +0800 Subject: [PATCH] fix: can not get import meta env variables in renderer #10 --- src/plugin.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugin.ts b/src/plugin.ts index a2aa6bc..b0dfb3a 100644 --- a/src/plugin.ts +++ b/src/plugin.ts @@ -238,6 +238,8 @@ export function electronRendererVitePlugin(options?: ElectronPluginOptions): Plu const buildConfig = mergeConfig(defaultConfig.build, config.build || {}) config.build = buildConfig + + config.envDir = config.envDir || path.resolve(root) } }, {