antfu / unplugin-vue2-script-setup

💡 Bring `<script setup>` to Vue 2.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unterminated regular expression with less or equal operator

hinaloe opened this issue · comments

I have not confirmed if this package is the cause, but when I use the <= operator in <script setup>, the build fails with SyntaxError: Unterminated regular expression.

This can be reproduced, for example, by adding the following sfc to the snapshot test of Jest:

<template>
  <div>{{ bool }}</div>
</template>

<script setup>
const bool = 7 <= 7
</script>

Of course, the following will work fine:

<template>
  <div>{{ bool }}</div>
</template>

<script setup>
const bool = 7 < 7
</script>