MiniCssExtractPlugin In Webpack Why Usage Code Example


Example 1: mini-css-extract-plugin sass


//installation
npm install --save-dev mini-css-extract-plugin

//configuration
const MiniCssExtractPlugin = require('mini-css-extract-plugin');

module.exports =
{
plugins: [new MiniCssExtractPlugin()],
module:
{
rules: [
{
test: /\.css$/i,
use: [MiniCssExtractPlugin.loader, 'css-loader'],
},
],
},
};

Example 2: mini-css-extract-plugin


npm install --save-dev mini-css-extract-plugin

Comments

Popular posts from this blog

Converting A String To Int In Groovy

"Cannot Create Cache Directory /home//.composer/cache/repo/https---packagist.org/, Or Directory Is Not Writable. Proceeding Without Cache"

Android How Can I Convert A String To A Editable