tailwindcss icon indicating copy to clipboard operation
tailwindcss copied to clipboard

Resolve config file relative to the file being transformed instead of cwd

Open mischnic opened this issue 2 years ago • 0 comments

What version of Tailwind CSS are you using?


What build tool (or framework if it abstracts the build tool) are you using?

Parcel 2 👋

What version of Node.js are you using?


What operating system are you using?


Describe your issue

A "standard" PostCSS config like

const path = require("path");

module.exports = {
  plugins: [

causes Tailwind to search for the config file relative to the current working directory because of this


I think it should instead be relative to the file that's being processed. This way you could also have a single project with multiple config files for different parts.

This might have performance downsides if you currently search just once for a config.

mischnic avatar Dec 14 '21 21:12 mischnic