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

Duplicate import warning when linking to a package #273

Open
cjpearson opened this issue Sep 12, 2023 · 1 comment
Open

Duplicate import warning when linking to a package #273

cjpearson opened this issue Sep 12, 2023 · 1 comment

Comments

@cjpearson
Copy link

Environment

Node v18.16.0, Nuxt 3.7.1, Unimport 3.3.0

Reproduction

In v3.3.0 both the .d.ts and .mjs files are being imported from a linked package, causing import warnings.

Describe the bug

I have a nuxt module that registers a directory of composables for auto-import. It works fine when installed to node_modules, but as of [email protected] there is now a warning that occurs whens the module is linked.

Duplicated imports "useLog", the one from "[path to package]/dist/runtime/composables/core/useLog.d.ts" has been ignored

It looks like scanFilesFromDir should be ignoring the .d.ts files, but it doesn't work when the package is linked.

Additional context

No response

Logs

No response

@robinscholz
Copy link

We are also seeing this with various nuxt modules which register composables for auto importing as well as importing and using those composables internally within registered components!

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

No branches or pull requests

2 participants