fix(ui-templates): switch to useHead import (#89)

This commit is contained in:
Daniel Roe 2022-04-07 11:57:16 +01:00 committed by GitHub
parent 617a0f5a72
commit 2db880ab30

View File

@ -96,9 +96,9 @@ export const RenderPlugin = () => {
}]))
const vueCode = [
'<script setup>',
title && 'import { useMeta } from \'#app\'',
title && 'import { useHead } from \'#imports\'',
`const props = defineProps(${props})`,
title && 'useMeta(' + genObjectFromRawEntries([
title && 'useHead(' + genObjectFromRawEntries([
['title', `\`${title}\``],
['script', inlineScripts.map(s => ({ children: `\`${s}\`` }))],
['style', [{ children: `\`${globalStyles}\`` }]]