-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
Hi there;
When i use amp mode in a page, script property isn't working in head() methods. I need to add custom script to the page. How can i fix it?
Thanks a lot.
<template>
<div>The test</div>
</template>
<script>
export default {
amp: 'only', // if i remove this line, script prop is working in head(),
ampLayout: 'default.amp',
head() {
return {
title: 'Test title', // working
"script": [
{
innerHTML: `window.test = 'abcd1234'`,
type: 'text/javascript',
charset: 'utf-8',
},
], // script props is not working on ssr,
}
}
}
</script>Metadata
Metadata
Assignees
Labels
No labels