Skip to content

Better in-terminal reporting for reserved cases #29258

Open
@ramijames

Description

@ramijames

Describe the feature

As discussed on Reddit here.

This was a new-user issue for me, as I didn't realize that useState was reserved. The terminal error that it spit out was:

WARN Duplicated imports "useState", the one from "#app/composables/state" has been ignored and "/Users/ramijames/_CODE/vewrite/composables/useState.js" is used

I'd like to suggest that there be a more specific error for reserved cases that explicitly states that they are reserved.

@danielroe suggested that we can add some code for this case in packages/nuxt/src/imports/module.ts

If you want, I am happy to create a PR for this.

Additional information

  • Would you be willing to help implement this feature?
  • Could this feature be implemented as a module?

Final checks

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions