mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-30 01:17:16 +00:00
fix(kit): support modern builds with extendWebpackConfig
(#1055)
This commit is contained in:
parent
0591350f5b
commit
90eacb6f75
@ -180,6 +180,13 @@ export interface ExtendWebpackConfigOptions extends ExtendConfigOptions {
|
|||||||
* @default true
|
* @default true
|
||||||
*/
|
*/
|
||||||
client?: boolean
|
client?: boolean
|
||||||
|
/**
|
||||||
|
* Install plugin on modern build
|
||||||
|
*
|
||||||
|
* @default true
|
||||||
|
* @deprecated Nuxt 2 only
|
||||||
|
*/
|
||||||
|
modern?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ExtendViteConfigOptions extends ExtendConfigOptions {}
|
export interface ExtendViteConfigOptions extends ExtendConfigOptions {}
|
||||||
@ -216,6 +223,13 @@ export function extendWebpackConfig (
|
|||||||
fn(config)
|
fn(config)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Nuxt 2 backwards compatibility
|
||||||
|
if (options.modern !== false) {
|
||||||
|
const config = configs.find(i => i.name === 'modern')
|
||||||
|
if (config) {
|
||||||
|
fn(config)
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user