postcss / postcss-cli

CLI for postcss
Other
836 stars 93 forks source link

Wrong postcss.config.js file fails silently #428

Closed felixbecker closed 2 years ago

felixbecker commented 2 years ago

Hi,

I was setting up tailwindcss with postcss and had a strange issue without any error messages.

I created a tailwind.css file

@tailwind base;
@tailwind components;
@tailwind utilities;

and had a postcss.config.js like this:

module.exports = {
  plugin:{
    tailwindcss:{},
    autoprefixer:{},
  }

}

when I executed: postcss tailwind.css -o public/build/styles.css the styles.css file looked exactly like the tailwind.css still including the @tailwind directive.

After some hours of research I finally found the typo in my postcss.config.js ... so it had to be plugins and not plugin I would rather prefer to crash on execution instead of failing silently. Don't not know if someone considered to validate the postcss.config.js for example with a json schema?

RyanZim commented 2 years ago

This would be the responsibility of https://github.com/postcss/postcss-load-config; perhaps file an issue there?