I had a main <script> block, and the rest were in the html fences. Thanks to preventExtract: false, these extra script tags get injected and break the component. I wish to use preventExtract however, only use the first script tag to be used for the component.
The fix I've made will take the first script block it sees as the single-file-component's script block. Not sure if this is the best way of solving this issue, open to suggestions.
Came across an issue when dealing with a page which had multiple
<script>
blocks.https://github.com/vuejs/vue-loader/issues/228
I had a main
<script>
block, and the rest were in thehtml
fences. Thanks topreventExtract: false
, these extra script tags get injected and break the component. I wish to usepreventExtract
however, only use the firstscript
tag to be used for the component.The fix I've made will take the first script block it sees as the single-file-component's script block. Not sure if this is the best way of solving this issue, open to suggestions.