mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 07:05:11 +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,
|
||||
}))
|
||||
}
|
||||
config.plugins.push(clientFallbackAutoIdPlugin.vite({
|
||||
sourcemap: !!nuxt.options.sourcemap[mode],
|
||||
rootDir: nuxt.options.rootDir,
|
||||
}))
|
||||
if (nuxt.options.experimental.clientFallback) {
|
||||
config.plugins.push(clientFallbackAutoIdPlugin.vite({
|
||||
sourcemap: !!nuxt.options.sourcemap[mode],
|
||||
rootDir: nuxt.options.rootDir,
|
||||
}))
|
||||
}
|
||||
config.plugins.push(loaderPlugin.vite({
|
||||
sourcemap: !!nuxt.options.sourcemap[mode],
|
||||
getComponents,
|
||||
@ -291,10 +293,12 @@ export default defineNuxtModule<ComponentsOptions>({
|
||||
getComponents,
|
||||
}))
|
||||
}
|
||||
config.plugins.push(clientFallbackAutoIdPlugin.webpack({
|
||||
sourcemap: !!nuxt.options.sourcemap[mode],
|
||||
rootDir: nuxt.options.rootDir,
|
||||
}))
|
||||
if (nuxt.options.experimental.clientFallback) {
|
||||
config.plugins.push(clientFallbackAutoIdPlugin.webpack({
|
||||
sourcemap: !!nuxt.options.sourcemap[mode],
|
||||
rootDir: nuxt.options.rootDir,
|
||||
}))
|
||||
}
|
||||
config.plugins.push(loaderPlugin.webpack({
|
||||
sourcemap: !!nuxt.options.sourcemap[mode],
|
||||
getComponents,
|
||||
|
Loading…
Reference in New Issue
Block a user