Skip to content
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

Object notation for tailwind content configuration is currently not supported #671

Closed
art-boer opened this issue May 9, 2023 · 3 comments · Fixed by #674
Closed

Object notation for tailwind content configuration is currently not supported #671

art-boer opened this issue May 9, 2023 · 3 comments · Fixed by #674
Assignees
Labels
enhancement New feature or request

Comments

@art-boer
Copy link

art-boer commented May 9, 2023

Is your feature request related to a problem? Please describe.

In one of our projects we would like to be able to use relative paths, within, the tailwind content configuration see: https://tailwindcss.com/docs/content-configuration#using-relative-paths

Trying to use object notation is not supported by the nuxt module, since it expects an array and will crash if being used like in the tailwind docs code snippet above.

Describe the solution you'd like

It would be great if we could also use the object notation for the content configuration in the tailwind config file, so we can enable relative paths.

@art-boer art-boer added the enhancement New feature or request label May 9, 2023
@ineshbose
Copy link
Collaborator

ineshbose commented May 9, 2023

Thank you for opening an issue. This came to my notice as well and I'll look into having this implemented soon (unless you're willing to make a PR 🙂).

I do want to ask - in this case, when using object configuration, would you want the default paths to merge with content.files or completely override (which I can see people leaning for)? Also on Tailwind's docs, they mention "This will likely become the default behavior in the next major version of the framework", but this merely be a consideration I think.

@art-boer
Copy link
Author

art-boer commented May 9, 2023

Hmm.. Tailwind is mentioning that it will likely become the default behavior, however, the exact details seem to be unclear (most likely v4). I did just find the following merged issue in their repository: tailwindlabs/tailwindcss#9396

It seems to have the following flag: future.relativeContentPathsByDefault this might be a workaround that can be used in the meantime.

@ineshbose
Copy link
Collaborator

Object syntax is nowhere to go it seems (considering all the properties, breaking changes, etc) - https://github.com/tailwindlabs/tailwindcss/pull/9396/files#diff-19584312cba053f9726eeb4b0766364b873cd974e552656c557ae30ee45f9d00 - so the module should support content as object. 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants