Skip to content

Go to definition doesn't work with Vue component imported without extension #858

@ltshb

Description

@ltshb

When importing a single file Vue component without the *.vue extension, then the Go to definition doesn't work.

For example with the code below

<template>
  <img alt="Vue logo" src="./assets/logo.png">
  <HelloWorld msg="Welcome to Your Vue.js App"/>
</template>

<script>
import HelloWorld from './components/HelloWorld'

export default {
  name: 'App',
  components: {
    HelloWorld
  }
}
</script>

<style>
...
</style>

We cannot use Go to definition to go to the definition of HelloWorld Vue component. However if you change the import as follow:

import HelloWorld from './components/HelloWorld.vue'

It works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    wontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions