Skip to content

Commit

Permalink
revert: support "setup" attribute in <script> tag in vue 3 (#667)
Browse files Browse the repository at this point in the history
This reverts commit 2cfe45f.
  • Loading branch information
piotr-oles committed Oct 20, 2021
1 parent 2cfe45f commit e9a4e8d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
Expand Up @@ -112,8 +112,8 @@ function createTypeScriptVueExtension(
} else if (isVueTemplateCompilerV3(compiler)) {
const parsed = compiler.parse(vueSourceText);

if (parsed.descriptor && (parsed.descriptor.script || parsed.descriptor.scriptSetup)) {
const scriptV3 = (parsed.descriptor.script || parsed.descriptor.scriptSetup)!;
if (parsed.descriptor && parsed.descriptor.script) {
const scriptV3 = parsed.descriptor.script;

// map newer version of SFCScriptBlock to the generic one
script = {
Expand Down
Expand Up @@ -23,7 +23,6 @@ interface SFCDescriptor {
filename: string;
template: SFCBlock | null;
script: SFCBlock | null;
scriptSetup: SFCBlock | null;
styles: SFCBlock[];
customBlocks: SFCBlock[];
}
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/fixtures/implementation/typescript-vue.fixture
Expand Up @@ -92,7 +92,7 @@ h1 {
</p>
</template>

<script setup lang="ts">
<script lang="ts">
import User, { getUserName } from '@/model/User';

export default {
Expand Down

0 comments on commit e9a4e8d

Please sign in to comment.