Q: Why does this webpack config emit over 400 files instead of just 2? When I build my bundle.js and bundle.css, a lot (399!) of javascript files are created in the process. I also get the required bundle.css and bundle.js and the 399 extra files are not required since my application seems to be working fine without them (when I remove them after the webpack build). 
I do not understand why this is happening. I am using webpack 4.30.
I have tried to rebuild my webpack config, but in the end I kind of had the same config in order to get it working. I am quite new to webpack. 
webpack.config.js
const path = require('path');
const webpack = require("webpack");
const autoprefixer = require("autoprefixer");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const VueLoaderPlugin = require('vue-loader/lib/plugin');

module.exports = {
    entry: {
        app: ['babel-polyfill', './src/main.js']
    },
    output: {
        filename: 'bundle.js',
        path: path.resolve(__dirname, 'wwwroot/js')
    },
    module: {
        rules: [
            {
                test: /\.(png|jpe?g|gif)$/,
                use: [
                    {
                        loader: 'file-loader',
                        options: {},
                    },
                ],
            },
            {
                test: /\.vue$/,
                loader: 'vue-loader'
            },
            {
                test: /\.js$/,
                exclude: /node_modules/,
                use: {
                    loader: "babel-loader"
                }
            },
            {
                test: /\.css$/,
                use: [
                    MiniCssExtractPlugin.loader,
                    {
                        loader: 'css-loader'
                    },
                    {
                        loader: 'postcss-loader'
                    }
                ]
            },
            {
                test: /\.scss$/,
                sideEffects: true,
                use: [
                    MiniCssExtractPlugin.loader,
                    { 
                        loader: 'css-loader'
                    },
                    {
                        loader: 'postcss-loader'
                    },
                    { 
                        loader: 'sass-loader' 
                    }
                ]
            }
        ]
    },
    plugins: [
        new webpack.ProvidePlugin({
            $: 'jquery',
            jQuery: 'jquery'
        }),
        new VueLoaderPlugin(),
        new MiniCssExtractPlugin({
            filename: "../css/bundle.css",
        }),
        new webpack.LoaderOptionsPlugin({
            options: {
                postcss: [
                    autoprefixer()
                ]
            }
        })
    ],
    resolve: {
        extensions: [ '.js', '.vue' ],
        alias: {
            vue$: "vue/dist/vue.esm.js"
        }
    }
};

package.json
{
  "name": "TestProject",
  "sideEffects": false,
  "version": "1.0.0",
  "private": true,
  "description": "Just a test project",
  "main": "index.js",
  "scripts": {
    "watch": "webpack --watch --mode development",
    "dev": "webpack --mode development --display-error-details",
    "build": "webpack --mode production --progress"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "@babel/core": "^7.4.4",
    "@babel/plugin-syntax-dynamic-import": "^7.2.0",
    "@babel/preset-env": "^7.4.4",
    "@fortawesome/fontawesome-free": "^5.8.1",
    "autoprefixer": "^9.5.1",
    "babel-loader": "^8.0.5",
    "babel-polyfill": "^6.26.0",
    "css-loader": "^2.1.1",
    "file-loader": "^3.0.1",
    "mini-css-extract-plugin": "^0.6.0",
    "node-sass": "^4.12.0",
    "postcss-loader": "^3.0.0",
    "sass-loader": "^7.1.0",
    "style-loader": "^0.23.1",
    "vue": "^2.6.10",
    "vue-loader": "^15.7.0",
    "vue-template-compiler": "^2.6.10",
    "webpack": "^4.30.0",
    "webpack-cli": "^3.3.2"
  },
  "dependencies": {
    "@fortawesome/fontawesome-svg-core": "latest",
    "@fortawesome/free-regular-svg-icons": "^5.8.1",
    "@fortawesome/free-solid-svg-icons": "latest",
    "@fortawesome/vue-fontawesome": "latest",
    "ace-builds": "^1.4.4",
    "axios": "^0.18.0",
    "bootstrap": "^4.3.1",
    "chart.js": "^2.8.0",
    "jquery": "^3.4.1",
    "popper.js": "^1.14.7",
    "vue": "^2.6.9",
    "vue-chartjs": "^3.4.2",
    "vue-flatpickr-component": "^8.1.2",
    "vue-markdown": "^2.2.4"
  }
}


edit
I discovered that the same config does not result into 400 files on Linux. There it produces just a single bundle.js file
