[READ-ONLY] a fast, modern browser for the npm registry
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: do not fail preview builds when lunaria fails

+11 -3
+11 -3
modules/lunaria.ts
··· 27 27 if (!isCI || !existsSync(lunariaDistPath)) { 28 28 mkdirSync(lunariaDistPath, { recursive: true }) 29 29 nuxt.hook('nitro:build:before', async () => { 30 - execSync('node --experimental-transform-types ./lunaria/lunaria.ts', { 31 - cwd: nuxt.options.rootDir, 32 - }) 30 + try { 31 + execSync('node --experimental-transform-types ./lunaria/lunaria.ts', { 32 + 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 + } 33 41 }) 34 42 } 35 43 },