Closed harrisonfm closed 3 years ago
Fixed with
//package.json
{
...
"autoprefixer": "^10.0.4",
"postcss-loader": "^4.1.0",
"tailwindcss": "^2.0.1",
"mini-css-extract-plugin": "^1.3.1",
"postcss": "^8.1.10",
}
//webpack/loaders/postcss.js
{
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
module.exports = {
test: /\.css$/,
use: [
MiniCssExtractPlugin.loader,
'css-loader',
'postcss-loader',
],
};
}
//webpack/plugins/index.js
{
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
//...
plugins = [
//...
//new ExtractTextPlugin('styles.css')
new MiniCssExtractPlugin({
filename: 'styles.css'
}),
]
Hi,
I'm trying to upgrade Tailwind to 2.0, but running into issues around its PostCSS dependency. I believe the deprecated plugin ExtractTextWebpackPlugin is the issue. It's been replaced with MiniCssExtractPlugin. I've not yet successfully fixed the build with that newer Webpack plugin. Has anyone done this migration yet?