fix(nuxt): remove experimental hash hydration (#22648)

This commit is contained in:
Harlan Wilton 2023-08-16 11:25:07 +03:00 committed by GitHub
parent 929dba4b22
commit 28e4cc298c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -60,13 +60,8 @@ export default defineNuxtModule({
if (!nuxt.options.experimental.headNext) {
return 'export default []'
}
// TODO don't use HashHydrationPlugin for SPA
return `import { CapoPlugin, HashHydrationPlugin } from '@unhead/vue'
const plugins = [HashHydrationPlugin()];
if (process.server) {
plugins.push(CapoPlugin({ track: true }));
}
export default plugins;`
return `import { CapoPlugin } from '@unhead/vue';
export default process.server ? [CapoPlugin({ track: true })] : [];`
}
})