This repository was archived by the owner on Dec 25, 2024. It is now read-only.
This repository was archived by the owner on Dec 25, 2024. It is now read-only.
<script setup> must has attribute lang="js"
? #3
Closed
Description
I like this plugin, great idea!!!
Here are my doubts:
if script don't has attribute lang="js"
then get an error
[plugin:vue2-script-setup-transform] Unsupported script language: undefined
add to fix it, is something miss in document or just a bug?
The point of the error code:
if (lang === 'ts')
plugins.push('typescript')
else if (lang === 'jsx')
plugins.push('jsx')
else if (lang === 'tsx')
plugins.push('typescript', 'jsx')
else if (lang !== 'js')
throw new SyntaxError(`Unsupported script language: ${lang}`)
source code:
<template>
<div>
<h1>{{ msg }}</h1>
</div>
</template>
<script setup>
import { ref } from "@vue/composition-api";
const msg = ref("bar")
</script>
<style></style>
Metadata
Metadata
Assignees
Labels
No labels