diff --git a/packages/nitro/src/module/nuxt2.ts b/packages/nitro/src/module/nuxt2.ts index 3fee09c3f8..9682cdc27a 100644 --- a/packages/nitro/src/module/nuxt2.ts +++ b/packages/nitro/src/module/nuxt2.ts @@ -27,6 +27,9 @@ export default function (nuxt, moduleContainer) { sigmaDevContext._internal.hooks.hook('renderLoading', (req, res) => nuxt.callHook('server:nuxt:renderLoading', req, res)) + // Expose process.env.SIGMA_PRESET + nuxt.options.env.SIGMA_PRESET = sigmaContext.preset + // Replace nuxt server if (nuxt.server) { nuxt.server.__closed = true diff --git a/packages/nitro/src/rollup/config.ts b/packages/nitro/src/rollup/config.ts index a4dfd1abd4..66d6cb89e5 100644 --- a/packages/nitro/src/rollup/config.ts +++ b/packages/nitro/src/rollup/config.ts @@ -92,7 +92,8 @@ export const getRollupConfig = (sigmaContext: SigmaContext) => { 'process.env.NUXT_STATIC_BASE': JSON.stringify(sigmaContext._nuxt.staticAssets.base), 'process.env.NUXT_STATIC_VERSION': JSON.stringify(sigmaContext._nuxt.staticAssets.version), // @ts-ignore - 'process.env.NUXT_FULL_STATIC': sigmaContext.fullStatic + 'process.env.NUXT_FULL_STATIC': sigmaContext.fullStatic, + 'process.env.SIGMA_PRESET': JSON.stringify(sigmaContext.preset) } }))