Skip to content

CSS import not working in Nuxt 3 #82

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

Open
shamsadanam opened this issue May 20, 2025 · 0 comments
Open

CSS import not working in Nuxt 3 #82

shamsadanam opened this issue May 20, 2025 · 0 comments

Comments

@shamsadanam
Copy link

Issue: Unable to Import CSS File from v-dropdown-menu Package

Nuxt Version: ^3.6.5
v-dropdown-menu Version: ^2.0.4


Problem

I'm trying to import the CSS file for the v-dropdown-menu package in a component like this:

import "v-dropdown-menu/dist/vue3/v-dropdown-menu.css";

However, this results in the following error:

[plugin:vite:import-analysis] Missing "./dist/vue3/v-dropdown-menu.css" specifier in "v-dropdown-menu" package

Workaround

Currently, I’m working around this issue by importing the file directly from node_modules, like so:

import "../node_modules/v-dropdown-menu/dist/vue3/v-dropdown-menu.css";

But this approach is not ideal or recommended.


Expected Behavior

The CSS should be importable using the standard package path:

import "v-dropdown-menu/dist/vue3/v-dropdown-menu.css";

Notes

It seems the package might be missing the proper export for the CSS file in its package.json.
Please advise if I'm doing something wrong or if this needs to be fixed in the package itself.

Thank you!

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

1 participant