Skip to content

Opt-out of router integrations #4341

@innocenzi

Description

@innocenzi

Description

I'm trying to use Nuxt UI in a project that doesn't use Vue Router nor Inertia (for the record, it uses https://hybridly.dev/, but I don't want a Link component integration at all).

When not using the inertia parameter, the following error occurs in the browsers' console:

Uncaught SyntaxError: The requested module 'http://[::1]:5173/@id/__vite-optional-peer-dep:vue-router:@nuxt/ui' doesn't provide an export named: 'useRoute'

Image

When setting inertia to true, I have the following one:

Uncaught SyntaxError: The requested module 'http://[::1]:5173/@id/__vite-optional-peer-dep:@inertiajs/vue3:@nuxt/ui' doesn't provide an export named: 'usePage'

Image

Both of these seem to be due to Nuxt UI expecting either vue-router or inertia-vue3 to be installed, which I don't want.

It would be nice if Nuxt UI supported a routerless option.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already existsenhancementNew feature or requestv3#1289

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions