Add <script type=“module”></script>
to prevent code collisions
#2594
pedroalonsoms
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've noticed in several places of the codebase there’s script tags without type=module annotation. This would be useful to prevent code duplication (as modules are only imported once). For example, a “product-carrousel.js” file is needed for a component. But, when importing the component twice in a page, we would be running the same script twice, which can pottentialy be dangerous (we only need it once).
Beta Was this translation helpful? Give feedback.
All reactions