Postcss: No plugins warning with webpack

Created on 27 Feb 2019  路  3Comments  路  Source: postcss/postcss

Running PostCSS with webpack. Plugins are working, but I get a lot of this error:

You did not set any plugins, parser, or stringifier. Right now, PostCSS does nothing. Pick plugins for your case on https://www.postcss.parts/ and use them in postcss.config.js.

Setup is similar to the example on the front page:

webpack.config.js

...
{
  test: /\.css$/,
  use: [
    MiniCssExtractPlugin.loader,
    {
      loader: 'css-loader',
      options: { importLoaders: 1 }
    },
    {
      loader: 'postcss-loader'
    }
  ]
}
...

postcss.config.js

module.exports = {
  plugins: [
    require('precss'),
    require('cssnano')
  ]
}

Most helpful comment

Sorry, thanks for the quick response.

However, just in case anyone stumbles across this in the future, I got some guidance via the postcss gitter channel, and found that the errors were from @import in my css. Installing the postcss-import plugin fixed the issue:

module.exports = {
  plugins: [
    require('postcss-import'),
    require('precss'),
    require('cssnano')
  ]
}

All 3 comments

Hi. Ask the question in postcss-loader repository.

Sorry, I do not work on this loader anymore and as result can fix its code.

Sorry, thanks for the quick response.

However, just in case anyone stumbles across this in the future, I got some guidance via the postcss gitter channel, and found that the errors were from @import in my css. Installing the postcss-import plugin fixed the issue:

module.exports = {
  plugins: [
    require('postcss-import'),
    require('precss'),
    require('cssnano')
  ]
}

Hurrah! i just do spell check of my _postcss.config.js_ file and got it,,,,,,,,,,,,,

**module.exports = {
plugins:[
require('tailwindcss'),
require('autoprefixer'),
]

}**

and its my package.json file

**{
"name": "TailwindCss",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {

"build": "postcss css/tailwind.css -o public/build/tailwind.css"

},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"autoprefixer": "^9.7.6",
"postcss-cli": "^7.1.1",
"tailwindcss": "^1.4.6"
}
}**

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Semigradsky picture Semigradsky  路  3Comments

aslushnikov picture aslushnikov  路  10Comments

OEvgeny picture OEvgeny  路  9Comments

alexander-akait picture alexander-akait  路  3Comments

StephenEsser picture StephenEsser  路  9Comments