mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
perf(nuxt): don't add client fallback plugin if not enabled (#26666)
This commit is contained in:
parent
7dcd9e2a2d
commit
bfb7eeac07
@ -222,10 +222,12 @@ export default defineNuxtModule<ComponentsOptions>({
|
|||||||
getComponents,
|
getComponents,
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
if (nuxt.options.experimental.clientFallback) {
|
||||||
config.plugins.push(clientFallbackAutoIdPlugin.vite({
|
config.plugins.push(clientFallbackAutoIdPlugin.vite({
|
||||||
sourcemap: !!nuxt.options.sourcemap[mode],
|
sourcemap: !!nuxt.options.sourcemap[mode],
|
||||||
rootDir: nuxt.options.rootDir,
|
rootDir: nuxt.options.rootDir,
|
||||||
}))
|
}))
|
||||||
|
}
|
||||||
config.plugins.push(loaderPlugin.vite({
|
config.plugins.push(loaderPlugin.vite({
|
||||||
sourcemap: !!nuxt.options.sourcemap[mode],
|
sourcemap: !!nuxt.options.sourcemap[mode],
|
||||||
getComponents,
|
getComponents,
|
||||||
@ -291,10 +293,12 @@ export default defineNuxtModule<ComponentsOptions>({
|
|||||||
getComponents,
|
getComponents,
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
if (nuxt.options.experimental.clientFallback) {
|
||||||
config.plugins.push(clientFallbackAutoIdPlugin.webpack({
|
config.plugins.push(clientFallbackAutoIdPlugin.webpack({
|
||||||
sourcemap: !!nuxt.options.sourcemap[mode],
|
sourcemap: !!nuxt.options.sourcemap[mode],
|
||||||
rootDir: nuxt.options.rootDir,
|
rootDir: nuxt.options.rootDir,
|
||||||
}))
|
}))
|
||||||
|
}
|
||||||
config.plugins.push(loaderPlugin.webpack({
|
config.plugins.push(loaderPlugin.webpack({
|
||||||
sourcemap: !!nuxt.options.sourcemap[mode],
|
sourcemap: !!nuxt.options.sourcemap[mode],
|
||||||
getComponents,
|
getComponents,
|
||||||
|
Loading…
Reference in New Issue
Block a user