After recently upgrading from Vue 2 to Vue 3, I encountered a problem in my app where certain parts show a warning in development
mode:
[Vue warn]: Template compilation error: Tags with side effect (<script> and <style>) are ignored in client component templates.
In Vue 2, these warnings were hidden in production
. However, in Vue 3, encountering these warnings results in the entire page breaking and showing a blank screen. Surprisingly, they work fine in development
.
Removing all of these <script>
tags is not a feasible solution for me since they are dynamically inserted by my CMS (Shopify).
Is there a way to handle these errors in production so that they do not disrupt the functioning of my site?