Skip to content

Conversation

@huang-julien
Copy link
Member

πŸ”— Linked issue

fix #162

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

This PR makes findImportSpecifier look over all importDecl instead of looking for the first import. We can have code like

import { ref } from 'vue'
import { defineComponent } from 'vue'

that get defineComponenyt import from @nuxt/hints injected but not having the import from vue removed because the first line get matched.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 13, 2025

Open in StackBlitz

npm i https://pkg.pr.new/nuxt/hints/@nuxt/hints@167

commit: ecf7a19

@huang-julien huang-julien merged commit 35ac99a into main Dec 14, 2025
6 checks passed
@huang-julien huang-julien deleted the fix/duplicatedimport branch December 14, 2025 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants