﻿const webpack = require("webpack");
const config = require("./webpack.base.config");

config.module.rules.push(
    {
        test: /\.jsx?$/,
        use: ["eslint-loader"],
        exclude: /node_modules/,
        enforce: "pre"
    },
    {
        test: /\.css$/,
        use: ["style-loader", "css-loader"]
    },
    {
        test: /\.less$/,
        use: ["style-loader", "css-loader", "less-loader"]
    }
);

config.plugins.push(
    new webpack.SourceMapDevToolPlugin({
        filename: "[file].map",
        exclude: ["vendor.js"]
    })
);

// HMR.
// config.module.loaders[0].loaders.unshift("react-hot");
// for (const key of Object.keys(config.entry))
// {
//     config.entry[key].push("webpack-hot-middleware/client?reload=true");
// }
// config.plugins.push(
//     new webpack.HotModuleReplacementPlugin()
// );

module.exports = config;

@@ -108,24 +108,48 @@
 push(%0A    %7B%0A
+        enforce: %22pre%22,%0A
         test
@@ -228,32 +228,8 @@
 les/
-,%0A        enforce: %22pre%22
 %0A   

update to webpack 2