Resolve tailwind.config.cjs
by default in ESM projects.
#567
Labels
feature request
New feature request
tailwind.config.cjs
by default in ESM projects.
#567
In an ESM project (that is
type='module'
), CommonJS/CJS like configuration files are typically written with aCJS
extension:When using Twin in an ESM project, any existing
tailwind.config.cjs
configuration file is silently ignored as the code only attempts to resolve atailwind.config.js
file as seen here.It would be nice if Twin was a little friendlier to ESM projects and attempted to load the a Tailwind config file with a CJS extension instead of silently ignoring it. Tailwind added support for CJS configuration files here.
The workaround, of course, is to simply specify the path to the CJS configuration file in the macro configuration:
This works perfectly, but sadly took me a long time to debug.
The text was updated successfully, but these errors were encountered: