update getSigmaContext name (#73)

This commit is contained in:
Xin Du (Clark) 2021-01-21 00:58:43 +00:00 committed by GitHub
parent f4e15196b2
commit 0ebab89014
2 changed files with 4 additions and 4 deletions

View File

@ -64,7 +64,7 @@ export interface SigmaInput extends DeepPartial<SigmaContext> {}
export type SigmaPreset = SigmaInput | ((input: SigmaInput) => SigmaInput) export type SigmaPreset = SigmaInput | ((input: SigmaInput) => SigmaInput)
export function getsigmaContext (nuxtOptions: NuxtOptions, input: SigmaInput): SigmaContext { export function getSigmaContext (nuxtOptions: NuxtOptions, input: SigmaInput): SigmaContext {
const defaults: SigmaContext = { const defaults: SigmaContext = {
timing: true, timing: true,
inlineChunks: true, inlineChunks: true,

View File

@ -1,7 +1,7 @@
import fetch from 'node-fetch' import fetch from 'node-fetch'
import { resolve } from 'upath' import { resolve } from 'upath'
import { build, generate, prepare } from '../build' import { build, generate, prepare } from '../build'
import { getsigmaContext, SigmaContext } from '../context' import { getSigmaContext, SigmaContext } from '../context'
import { createDevServer } from '../server' import { createDevServer } from '../server'
import wpfs from '../utils/wpfs' import wpfs from '../utils/wpfs'
@ -19,8 +19,8 @@ export default function (nuxt, moduleContainer) {
} }
// Create contexts // Create contexts
const sigmaContext = getsigmaContext(nuxt.options, nuxt.options.sigma || {}) const sigmaContext = getSigmaContext(nuxt.options, nuxt.options.sigma || {})
const sigmaDevContext = getsigmaContext(nuxt.options, { preset: 'local' }) const sigmaDevContext = getSigmaContext(nuxt.options, { preset: 'local' })
// Connect hooks // Connect hooks
nuxt.addHooks(sigmaContext.nuxtHooks) nuxt.addHooks(sigmaContext.nuxtHooks)