mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 21:55:11 +00:00
feat: expose process.env.SIGMA_PRESET
This commit is contained in:
parent
0b51fb3bc3
commit
02a66ab40c
@ -27,6 +27,9 @@ export default function (nuxt, moduleContainer) {
|
|||||||
sigmaDevContext._internal.hooks.hook('renderLoading',
|
sigmaDevContext._internal.hooks.hook('renderLoading',
|
||||||
(req, res) => nuxt.callHook('server:nuxt:renderLoading', req, res))
|
(req, res) => nuxt.callHook('server:nuxt:renderLoading', req, res))
|
||||||
|
|
||||||
|
// Expose process.env.SIGMA_PRESET
|
||||||
|
nuxt.options.env.SIGMA_PRESET = sigmaContext.preset
|
||||||
|
|
||||||
// Replace nuxt server
|
// Replace nuxt server
|
||||||
if (nuxt.server) {
|
if (nuxt.server) {
|
||||||
nuxt.server.__closed = true
|
nuxt.server.__closed = true
|
||||||
|
@ -92,7 +92,8 @@ export const getRollupConfig = (sigmaContext: SigmaContext) => {
|
|||||||
'process.env.NUXT_STATIC_BASE': JSON.stringify(sigmaContext._nuxt.staticAssets.base),
|
'process.env.NUXT_STATIC_BASE': JSON.stringify(sigmaContext._nuxt.staticAssets.base),
|
||||||
'process.env.NUXT_STATIC_VERSION': JSON.stringify(sigmaContext._nuxt.staticAssets.version),
|
'process.env.NUXT_STATIC_VERSION': JSON.stringify(sigmaContext._nuxt.staticAssets.version),
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
'process.env.NUXT_FULL_STATIC': sigmaContext.fullStatic
|
'process.env.NUXT_FULL_STATIC': sigmaContext.fullStatic,
|
||||||
|
'process.env.SIGMA_PRESET': JSON.stringify(sigmaContext.preset)
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user