If there are two <script>tag, only the first one will be parsed.
See original GitHub issuequestion
In some cases, a file may have two <script>
tags, bug only the first one will be parsed.
exp:
<template>
<div />
</template>
<script type="customBlock">
// The code here will be normally parsed
let a = 1
</script>
<script>
export default {
// The code here will be ignored
let b = 2
}
</script>
Expect
Parse all code, or we can customize parsing of certain code libraries.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
javascript - multiple versus single script tags
Builds up a string of the the text in the tag up until the first time it sees the string "</script>"; Hands that...
Read more >Everything I Know About The Script Tag - Eager Blog
A script tag can either include the JavaScript directly, or it can point to a URL where the script should be loaded from....
Read more >The Script Tag in Your HTML Document | by Bern
If you have multiple <script> tags in your HTML, this also means that both scripts will be downloaded and executed simultaneously.
Read more >1. Loading and Execution - High Performance JavaScript ...
The JavaScript file will begin downloading at the point that the <script> tag is parsed, but the code will not be executed until...
Read more >The Script element - HTML: HyperText Markup Language
For classic scripts, if the async attribute is present, then the classic script will be fetched in parallel to parsing and evaluated as...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
exactly, but it’s a conflict with the rule
import/first
>.<Yes. Using
<script>
with<script setup>
is already supported.