Handle alias for @reference within css module to prevent from long relative path #19058
Closed
radonirinamaminiaina
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
|
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.
1 reply
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
@referencein a Next.js 15 & Shadcn/ui v4 project.I have a file in
app/(group)/path/subpath/sectionsthat 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
@referencedirectives? Using@reference "@/globals.css"would be much cleaner.Regards
Beta Was this translation helpful? Give feedback.
All reactions