Add support for /.config
#12958
zoey-kaiser
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
I'll link the PR that added supported for ESM/TS configuration files - #10785 This loader already uses |
Beta Was this translation helpful? Give feedback.
1 reply
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
-
Hello, everyone!
Recently a new "movement" / "project" has started inside the Nuxt community. This was started by @pi0 and aims to motivate as many projects as possible to add support for adding their configuration files to a
./config
folder. You can read more about this here.Description
Due to a lack of standards for where tools store their configuration, the number of top-level configuration files in projects is increasing day by day. See .config dir proposal for more context.
While it can take a while to onboard more tools with this new convention, it will be an egg-and-chicken problem to adopt a new convention like this unless more mainstream tools onboard to support it.
Suggested solution
I propose supporting
.config/tailwindcss.js
and.config/tailwindcss.config.js
as alternative places to check and load the configuration if the top-leveltailwindcss.config.js
does not exist to unblock adopting this new convention across the ecosystem.I think this would need to mainly be done in https://github.com/tailwindlabs/tailwindcss-intellisense, and after doing some research I noticed that users can already define a custom location for this by using
tailwindCSS.experimental.configFile
, however it seems to be experimental currently.Based of this description in the repository:
It seems that the intellisense can already find configs not inside the root, but I wanted to verify this and if it is not the case, request that
./config/tailwind.config.js
and./config/tailwind.js
could also be added to the default locations to search for!Alternatives
See relevant discussions.
Context
We approached the Nuxt Module of TailwindCSS to add support for this, however we also wanted to bring this into the main project to see if we can motivate more developers outside of the Nuxt sphere to also adopt this!
nuxt-modules/tailwindcss#808
Beta Was this translation helpful? Give feedback.
All reactions