File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 1- import process from 'node:process'
21import { defineNuxtModule , useNuxt } from 'nuxt/kit'
32import { execSync } from 'node:child_process'
43import { join } from 'node:path'
54import { existsSync , mkdirSync } from 'node:fs'
65import { isCI , isTest } from 'std-env'
6+ import { getEnv } from '../config/env.ts'
77
88export default defineNuxtModule ( {
99 meta : {
@@ -33,9 +33,10 @@ export default defineNuxtModule({
3333 cwd : nuxt . options . rootDir ,
3434 } )
3535 } catch ( e ) {
36- // do not throw when building for staging
37- const env = process . env . VERCEL_ENV
38- if ( ! isCI || ( env && env === 'production' ) ) {
36+ // Always throw in local dev.
37+ // In CI, only throw if building for production.
38+ const { env } = await getEnv ( ! isCI )
39+ if ( env === 'dev' || env === 'release' ) {
3940 throw e
4041 }
4142 }
You can’t perform that action at this time.
0 commit comments