mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 23:22:02 +00:00
perf(nuxt): don't run island transform plugin if disabled (#21844)
This commit is contained in:
parent
17801d3ae8
commit
cc4cf68ed4
@ -222,9 +222,11 @@ export default defineNuxtModule<ComponentsOptions>({
|
||||
experimentalComponentIslands: nuxt.options.experimental.componentIslands
|
||||
}))
|
||||
|
||||
if (isServer && nuxt.options.experimental.componentIslands) {
|
||||
config.plugins.push(islandsTransform.vite({
|
||||
getComponents
|
||||
}))
|
||||
}
|
||||
})
|
||||
nuxt.hook('webpack:config', (configs) => {
|
||||
configs.forEach((config) => {
|
||||
@ -248,9 +250,11 @@ export default defineNuxtModule<ComponentsOptions>({
|
||||
experimentalComponentIslands: nuxt.options.experimental.componentIslands
|
||||
}))
|
||||
|
||||
if (nuxt.options.experimental.componentIslands && mode === 'server') {
|
||||
config.plugins.push(islandsTransform.webpack({
|
||||
getComponents
|
||||
}))
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user