Skip to content

Commit

Permalink
fix: remove process.env edge case in defines (#1156)
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va committed Apr 15, 2022
1 parent 925ff1f commit 0c9137d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/vitest/src/node/plugins/index.ts
Expand Up @@ -27,8 +27,10 @@ export async function VitestPlugin(options: UserConfig = {}, ctx = new Vitest())
const preOptions = deepMerge({}, configDefaults, options, viteConfig.test ?? {})
preOptions.api = resolveApiConfig(preOptions)

if (viteConfig.define)
if (viteConfig.define) {
delete viteConfig.define['import.meta.vitest']
delete viteConfig.define['process.env']
}

// store defines for globalThis to make them
// reassignable when running in worker in src/runtime/setup.ts
Expand Down

0 comments on commit 0c9137d

Please sign in to comment.