Handle alias for @reference within css module to prevent from long relative path #19058
radonirinamaminiaina
started this conversation in
Ideas
Replies: 1 comment
-
You could consider using subpath imports: // package.json
{
…
"imports": {
"#globals.css": "./path/to/globals.css"
},
…
} @reference "#globals.css"; |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello Team,
I'm running into a long relative path issue with CSS
@reference
in a Next.js 15 & Shadcn/ui v4 project.I have a file in
app/(group)/path/subpath/sections
that needs to reference globals.css, which requires@reference "../../../../globals.css"
.Is there a way, or are there plans, to support path aliases like @/ within these
@reference
directives? Using@reference "@/globals.css"
would be much cleaner.Regards
Beta Was this translation helpful? Give feedback.
All reactions