Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First import quick fix puts import outside of <script> tag #1795

Open
3 tasks done
chbndrhnns opened this issue Mar 23, 2020 · 0 comments
Open
3 tasks done

First import quick fix puts import outside of <script> tag #1795

chbndrhnns opened this issue Mar 23, 2020 · 0 comments

Comments

@chbndrhnns
Copy link

  • I have searched through existing issues
  • I have read through docs
  • I have read FAQ

Info

  • Platform: macOS
  • Vetur version: 0.24.0
  • VS Code version: 1.43.1

Problem

If you use a quick fix to add a missing import statement and there is no existing import in the file, the import statement is put at the top of the file instead of the top of the <script> tag.

Kapture 2020-03-17 at 16 24 09

Reproducible Case

  • Create test.vue file
  • Add this content:
<template>
<div></div>
</template>

<script lang="ts">
export default class Test extends Vue {
} 
</script>
  • Use quick fix on missing import for Vue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants