Check out example codes for "mini-css-extract-plugin sass". It will help you in understanding the concepts better.

Code Example 1

//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'],
      },
    ],
  },
};

Learn ReactJs, React Native from akashmittal.com