diff --git a/packages/status-js/vite.config.ts b/packages/status-js/vite.config.ts index 01a77a86..f97ac9eb 100644 --- a/packages/status-js/vite.config.ts +++ b/packages/status-js/vite.config.ts @@ -14,7 +14,7 @@ const external = [ export default defineConfig(({ mode }) => { const alias: Alias[] = [] - if (mode === 'test') { + if (process.env.VITEST === 'true' || mode === 'test') { alias.push({ /** * Note: `happy-dom` nor `jsdom` have Crypto implemented (@see https://github.com/jsdom/jsdom/issues/1612)