Search code examples
webpackpostcsspostcss-loader

Webpack postcss loader, what's its purpose?


I am trying to find out, what the postcss-loader is good for.

On the github page

https://github.com/postcss/postcss-loader

it says:

Loader for webpack to process CSS with PostCSS

I dont't get that: So, PostCSS is a a WP-Loader to process CSS with PostCSS?

IMHO, that's a circular definition.

So what is PostCSS, is it a CSSLoader? Or, since it's called Post CSS is it a loader to run after some other CSS-loader?


Solution

  • So, PostCSS is a a WP-Loader to process CSS with PostCSS?

    No.

    PostCSS-loader is a WP-Loader so you can process CSS with PostCSS inside Webpack.

    i.e. It loads PostCSS into Webpack.

    IMHO, that's a circular definition

    It isn't because PostCSS and PostCSS-loader are different things.

    So what is PostCSS, is it a CSSLoader?

    No. PostCSS is:

    a tool for transforming styles with JS plugins. These plugins can lint your CSS, support variables and mixins, transpile future CSS syntax, inline images, and more.