Skip to content

Function not suggested to import from template in > 3.1.5 #5847

@twisterniq

Description

@twisterniq

Vue - Official extension or vue-tsc version

3.1.8

VSCode version

1.106.3

Vue version

3.5.25

TypeScript version

5.9.3

System Info

package.json dependencies

Steps to reproduce

  1. Create a basic .vue file:
<script setup>
</script>

<template>
  {{ testFn }}
</template>
  1. Create a basic .js file:
export function testFn() {
  console.log('testFn');
}
  1. Try to CTRL+SPACE on testFn, it should suggest to import that function (as in <= 3.1.5).

What is expected?

Import suggestion (in 3.1.5):

Image

What is actually happening?

No import suggestion (in 3.1.8):

Image

Link to minimal reproduction

https://github.com/twisterniq/vue-official-no-import-suggestion

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions