Skip to content

Commit

Permalink
fix: avoid running plugins in server components
Browse files Browse the repository at this point in the history
Fixes #191
  • Loading branch information
harlan-zw committed Mar 11, 2024
1 parent 48353f7 commit 5c0c90b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/runtime/nuxt/plugin/defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ import {

export default defineNuxtPlugin({
name: 'nuxt-seo:defaults',
env: {
islands: false,
},
setup() {
// get the head instance
const siteConfig = useSiteConfig()
Expand Down
3 changes: 3 additions & 0 deletions src/runtime/nuxt/plugin/titles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ function titleCase(s: string) {

export default defineNuxtPlugin({
name: 'nuxt-seo:fallback-titles',
env: {
islands: false,
},
setup() {
const route = useRoute()
const title = computed(() => {
Expand Down

0 comments on commit 5c0c90b

Please sign in to comment.