Webpack, IE8 and ES6 modules
<p>Recent versions of webpack do not support IE8. I have tried with 1.12.12 (which I believed was the last version to support IE8) but still get errors from the un-shimmable <code>Object.defineProperty</code>.</p>

<p><a href="https://github.com/webpack/webpack/issues/2085" rel="nofollow noreferrer">https://github.com/webpack/webpack/issues/2085</a></p>

<p>What was the last version of webpack to support IE8? Did it ever work with ES6 modules?</p>

<p>webpack.config.js:</p>

<pre><code>var webpack = require("webpack");
var es3ifyPlugin = require('es3ify-webpack-plugin');
var productionPlugin = new webpack.DefinePlugin({
    'process.env': {
        'NODE_ENV': JSON.stringify('production')
    }
});
var devPlugin = new webpack.DefinePlugin({
    "process.env": {
        NODE_ENV: JSON.stringify("dev")
    }
});

module.exports = {
    entry: {
        assessment: "./src/aaa/app.js"
    },
    //devtool: "source-map",
    output: {
        path: "../AAA/wwwroot/js",
        filename: "[name].bundle.js",
        publicPath: "/"
    },
    resolve: {
        extensions: ["", ".js"]
    },
    module: {
        preLoaders: [
            {
                test: /\.js$/,
                loader: "eslint-loader",
                exclude: "node_modules"
            }
        ],
        loaders: [
            {
                test: /\.js$/,
                exclude: /node_modules/,
                loader: "babel-loader"
            },
            {
                // todo: move less compiling to web project 
                test: /\.less$/,
                loader: "style-loader!css-loader!less-loader",
                exclude: "node_modules"
            },
        ]
    },
    devServer: {
        historyApiFallback: true,
        inline: true,
        proxy: {
            "/api": {
                "target": {
                    host: "localhost",
                    protocol: "http:",
                    port: "58211",
                },
                changeOrigin: true,
                pathRewrite: { "^/api": "" }
            }
        },
        publicPath: "/assets/"
    },
    plugins: [
        new es3ifyPlugin(),
        new webpack.optimize.CommonsChunkPlugin({
            name: "vendor",
            minChunks: isExternal
        }),
        productionPlugin
        //devPlugin
    ]
}

function isExternal(module) {
    var userRequest = module.userRequest;

    if (typeof userRequest !== "string") {
        return false;
    }

    return userRequest.indexOf("node_modules") &gt;= 0;
}
</code></pre>

<p>Transpiled code looks like this:</p>

<pre><code>exports.test = '123';

webpackJsonp([1, 0], [

  function (module, exports, __webpack_require__) {

    'use strict';

    var _imported = __webpack_require__(1);


    alert('test ' + _imported.test);

    function(module, exports) {

        "use strict";

        Object.defineProperty(exports, "__esModule", {
            value: true
        });
        var test = exports.test = 123;

      }
  ]);
</code></pre>