pawelgabryelewicz / babel-preset-typescript-vue

TypeScript preset for Babel 7.x supporting Vue.js components written in TS
MIT License
22 stars 4 forks source link

RollUp has a problem #5

Closed bichikim closed 4 years ago

bichikim commented 4 years ago

There is a problem with rollup bundling.

lib/index.js

          if (typeof json.script !== "undefined" && typeof json.script["@_lang"] && json.script["@_lang"].toLowerCase() === "ts") {
            return true;
          }

but your original src/index.js is

          if (typeof json.script !== "undefined" && typeof json.script["@_lang"] === "string" && json.script["@_lang"].toLowerCase() === "ts") {
            return true;
          }

=== "string" is removed by RollUp

so

<script lang="js">
<script> 

is work but

<script>
<script> 

is not work

pawelgabryelewicz commented 4 years ago

Republished with version 1.0.4, should be fine now.