title: MIME type ('text/html') is not a supported stylesheet MIME type
body: <p>I have tried almost every solution for the problem which includes.
  giving type for <code>&lt;link rel="stylesheet" href="./style.css" /&gt;</code> use of <code>app.use(express.static('public'))</code> and many more but it seems I am not able to find a solution for this.</p>
  
  <p><strong>index.js :</strong></p>
  
  <pre><code>import React from 'react';
  import { render } from 'react-dom';
  import { Provider } from 'react-redux'
  import "./assets/styles/app.less";
  import 'bootstrap/dist/js/bootstrap.js';
  import App from './components/base/App';
  import store from './store'
  
  const provider =
    &lt;Provider store={store}&gt;
      &lt;App /&gt;
    &lt;/Provider&gt;
  
  render(provider, document.getElementById('my-app'))
  </code></pre>
  
  <p><strong>index.html :</strong></p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  
  &lt;head&gt;
    &lt;meta http-equiv=X-UA-Compatible content="IE=edge,chrome=1"&gt;
    &lt;meta name="viewport" content="width=device-width"&gt;
    &lt;meta charset=utf-8&gt;
    &lt;meta http-equiv=Content-Type content="text/html;charset=utf-8"&gt;
    &lt;meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"&gt;
    &lt;title&gt;XYZ&lt;/title&gt;
    &lt;link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"&gt;
    &lt;link rel="stylesheet" href="./style.css" /&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
    &lt;div id="my-app"&gt;&lt;/div&gt;
    &lt;script type='text/javascript' src="./bundle.js"&gt;&lt;/script&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>webPack.config.js :</strong></p>
  
  <pre><code>'use strict';
  const webpack = require('webpack');
  
  const MiniCssExtractPlugin = require("mini-css-extract-plugin");
  const CopyWebpackPlugin = require('copy-webpack-plugin');
  const CleanWebpackPlugin = require('clean-webpack-plugin');
  const HtmlWebpackPlugin = require('html-webpack-plugin')
  
  const plugins = [
    new CleanWebpackPlugin({
      root: __dirname,
      verbose: true,
      dry: false
    }),
    new webpack.DefinePlugin({ 'process.env.NODE_ENV': '"production"' }),
    new MiniCssExtractPlugin({ filename: "style.css", allChunks: false }),
    new CopyWebpackPlugin([
      { from: './src/index.html', to: 'index.html' },
    ]),
    new webpack.ProvidePlugin({
      Promise: 'es6-promise-promise',
      'React': 'react'
    }),
    new HtmlWebpackPlugin({
      template: './src/index.html'
    })
  ];
  
  module.exports = {
    entry: ['@babel/polyfill', "./src/index.js"],
    output: {
      path: __dirname + '/dist',
      filename: "bundle.js",
      publicPath: '/'
    },
    module: {
      rules: [
        {
          test: /\.(js|jsx)$/,
          exclude: /node_modules/,
          use: {
            loader: "babel-loader"
          }
        },
        //load styles
        {
          test: /\.(sass|less|css)$/,
          use: [
            { loader: 'style-loader' },
            { loader: MiniCssExtractPlugin.loader },
            { loader: "css-loader", options: {} },
            {
              loader: "postcss-loader",
              options: {
                ident: 'postcss',
                plugins: [
                  require('autoprefixer')({
                    'browsers': ['&gt; 1%', 'last 2 versions']
                  }),
                ]
              }
            },
            { loader: "less-loader", options: {} }
          ]
        },
  
        // Load images
        {
          test: /\.jpg/,
          use: [{
            loader: "url-loader",
            options: {
              limit: 10000,
              mimetype: "image/jpg"
            }
          }]
        },
        {
          test: /\.gif/,
          use: [{
            loader: "url-loader",
            options: {
              limit: 10000,
              mimetype: "image/gif"
            }
          }]
        },
        {
          test: /\.png/,
          use: [{
            loader: "url-loader",
            options: {
              limit: 10000,
              mimetype: "image/png"
            }
          }]
        },
  
        // Load fonts
        {
          test: /\.woff(\?v=[0-9]\.[0-9]\.[0-9])?$/,
          use: [{
            loader: "url-loader",
            options: {
              limit: 10000,
              mimetype: "application/font-woff"
            }
          }]
        },
        {
          test: /\.(ttf|eot|svg)(\?v=[0-9]\.[0-9]\.[0-9])?$/,
          use: [{
            loader: "file-loader"
          }]
        },
        {
          test: /\.woff(2)?(\?v=\d+\.\d+\.\d+)?$/,
          use: [{
            loader: "url-loader",
            options: {
              limit: 10000,
              mimetype: "application/font-woff"
            }
          }]
        }
      ]
    },
    plugins: plugins,
    resolve: {
      extensions: ['.js', '.jsx', '.less', '.css'],
      modules: ["src", "node_modules"]
    },
    devServer: {
      compress: true,
      disableHostCheck: true,   // That solved it
    }
  }
  </code></pre>
  
  <p><strong>package.json script tag :</strong></p>
  
  <pre><code>"scripts": {
      "start": "webpack-dev-server --content-base dist/ --port 9000 --config webpack.config.js --watch --progress --inline --hot --history-api-fallback --mode development",
      "build": "cross-env NODE_ENV=production webpack --config webpack.config.js"
    },
  </code></pre>
  
  <p>npm strat is working fine the application is working fine, but when i do npm run build it gives me the error:</p>
  
  <pre><code>**Refused to apply style from 'http://localhost:9000/style.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.**
  
  **Refused to execute script from 'http://localhost:9000/bundle.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.**
  </code></pre>
  
  <p>In the network part I got the following:</p>
  
  <p><strong><code>Ok response for : http://localhost:9000/bundle.js</code></strong></p>
  
  <p><strong><code>cancled for : http://localhost:9000/style.css</code></strong> </p>
  
  <p>Help !!</p>