Skip to content

Commit

Permalink
fix: insert noscript tag in body open (#142)
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardogobbosouza committed Jul 21, 2023
1 parent 0e5fcf9 commit ed83ab8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ export default defineNuxtModule<ModuleOptions>({
// no-JS fallback
head.noscript.push({
key: 'gf-noscript',
innerHTML: `<link rel="stylesheet" href="${url}">`
innerHTML: `<link rel="stylesheet" href="${url}">`,
tagPosition: 'bodyOpen'
})

// Disable sanitazions
Expand Down Expand Up @@ -190,7 +191,8 @@ export default defineNuxtModule<ModuleOptions>({

// no-JS fallback
head.noscript.push({
children: `<link rel="stylesheet" href="${url}">`
children: `<link rel="stylesheet" href="${url}">`,
tagPosition: 'bodyOpen'
})
}
})

0 comments on commit ed83ab8

Please sign in to comment.