Open serdaronedio opened 3 years ago
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>
I also facing this issue as well.
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.