We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 96e7c71 commit c39683aCopy full SHA for c39683a
1 file changed
modules/lunaria.ts
@@ -27,9 +27,17 @@ export default defineNuxtModule({
27
if (!isCI || !existsSync(lunariaDistPath)) {
28
mkdirSync(lunariaDistPath, { recursive: true })
29
nuxt.hook('nitro:build:before', async () => {
30
- execSync('node --experimental-transform-types ./lunaria/lunaria.ts', {
31
- cwd: nuxt.options.rootDir,
32
- })
+ try {
+ execSync('node --experimental-transform-types ./lunaria/lunaria.ts', {
+ cwd: nuxt.options.rootDir,
33
+ })
34
+ } catch (e) {
35
+ // do not throw when building for staging
36
+ const env = process.env.VERCEL_ENV
37
+ if (!isCI || (env && env === 'production')) {
38
+ throw e
39
+ }
40
41
})
42
}
43
},
0 commit comments