I am migrating a large application from Vue2 to Vue3. On some pages, structured schema.org data in JSON-LD format is delivered from the server to the template. While Vue2 was not bothered by this (no JS code is executed), Vue3 now throws a warning:
[Vue warn]: Template compilation error: Tags with side effect (<script> and <style>) are ignored in client component templates. <script type=“application/ld+json”>
How do I get rid of that warning?
I have already tried to hide the script tag in a <template>
, or to ignore it with a v-pre
, but the message still appears. Are there any other ways to tell Vue to ignore that part of the template?