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')
]
}
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"
}
}**
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
@importin my css. Installing the postcss-import plugin fixed the issue: