mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-23 17:10:07 +00:00
chore: lint
This commit is contained in:
parent
93750ca200
commit
86c960c6f4
@ -20,7 +20,7 @@ export interface LoadNuxtOptions extends LoadNuxtConfigOptions {
|
||||
|
||||
export async function loadNuxt (opts: LoadNuxtOptions): Promise<Nuxt> {
|
||||
// Backward compatibility
|
||||
opts.cwd = opts.cwd || opts.rootDir
|
||||
opts.cwd ||= opts.rootDir
|
||||
opts.overrides ||= opts.config || {}
|
||||
|
||||
// Apply dev as config override
|
||||
|
@ -83,9 +83,7 @@ function _defineNuxtModule<
|
||||
|
||||
// Module format is always a simple function
|
||||
async function normalizedModule (this: any, inlineOptions: Partial<TOptions>, nuxt: Nuxt): Promise<ModuleSetupReturn> {
|
||||
if (!nuxt) {
|
||||
nuxt = tryUseNuxt() || this.nuxt /* invoked by nuxt 2 */
|
||||
}
|
||||
nuxt ||= tryUseNuxt() || this.nuxt /* invoked by nuxt 2 */
|
||||
|
||||
// Avoid duplicate installs
|
||||
const uniqueKey = module.meta.name || module.meta.configKey
|
||||
|
@ -387,7 +387,7 @@ export async function initNitro (nuxt: Nuxt & { _nitro?: Nitro }) {
|
||||
|
||||
// Add backward-compatible middleware to respect `x-nuxt-no-ssr` header
|
||||
if (nuxt.options.experimental.respectNoSSRHeader) {
|
||||
nitroConfig.handlers = nitroConfig.handlers || []
|
||||
nitroConfig.handlers ||= []
|
||||
nitroConfig.handlers.push({
|
||||
handler: resolve(distDir, 'core/runtime/nitro/no-ssr'),
|
||||
middleware: true,
|
||||
|
Loading…
Reference in New Issue
Block a user