Replies: 1 comment 1 reply
-
If it helps at all, you could use subpath imports, like: // package.json
"imports": {
"#tailwind.css": "path/to/tailwind.css",
"#theme.css": "path/to/styles/theme.css"
} @import "#tailwind.css";
@import "#theme.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.
-
What version of Tailwind CSS are you using?
v4.0.8
What build tool (or framework if it abstracts the build tool) are you using?
Vite 5.4.14 + vite-tsconfig-paths 5.1.4
What version of Node.js are you using?
v23.9
What browser are you using?
N/A
What operating system are you using?
Linux
Reproduction URL
Not necessary for this feature request.
Describe your issue
Currently, Tailwind CSS does not support TypeScript path aliases (from
tsconfig.json
) when using@import
or@reference
directives in stylesheets. This limitation forces developers to use cumbersome relative paths, especially in large projects.Current Behavior (Without Aliases)
Proposed Behavior (With Aliases)
Benefits
Possible Implementation
tsconfig.json
orjsconfig.json
for thepaths
property and resolve the alias mappings accordingly.Would love to hear thoughts from the Tailwind team and community on this! 🚀
Beta Was this translation helpful? Give feedback.
All reactions