Skip to content
This repository was archived by the owner on Apr 6, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions packages/nuxt/src/head/runtime/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ const globalProps = {
}

// <script>

let scriptDeprecated = false

/** @deprecated */
export const Script = defineComponent({
// eslint-disable-next-line vue/no-reserved-component-names
name: 'Script',
Expand Down Expand Up @@ -93,6 +97,11 @@ export const Script = defineComponent({
renderPriority: [String, Number]
},
setup: setupForUseMeta((props, { slots }) => {
if (process.dev && !scriptDeprecated) {
console.log('[nuxt] `<Script>` is deprecated and may be removed in a future release. We advise using `useHead()` directly.')
scriptDeprecated = true
}

const script = { ...props }
const textContent = (slots.default?.() || [])
.filter(({ children }) => children)
Expand Down