unjs / mkdist

Lightweight file-to-file transpiler.
MIT License
367 stars 25 forks source link

fix(vue): skip transpilation with multiple script blocks #243

Closed danielroe closed 2 months ago

danielroe commented 2 months ago

mkdist currently only transforms first block of each type in vue files.

This is a hotfix to handle an issue where the first <script> block is transpiled, and the second one isn't, which yields a vue compiler error (because lang should match between script blocks).

We would need to support handling multiple script blocks in future.

related: https://github.com/unjs/mkdist/issues/209