//in webpack.config.js
// for release v1.3.0
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
module.exports = {
plugins: [new MiniCssExtractPlugin()],
module: {
rules: [
{
test: /.css$/i,
use: [MiniCssExtractPlugin.loader, "css-loader"],
},
],
},
};
⚠️ Note that if you import CSS from your webpack entrypoint or import styles in
the initial chunk, mini-css-extract-plugin will not load this CSS into the page.
Please use html-webpack-plugin for automatic generation link tags or create index.html
file with link tag.