This repository demonstrates the problem in a minimal setup:
https://github.com/Q-Man/webpack-dev-server-ie-fail
// webpack.config.js
const webpack = require('webpack');
const path = require('path');
const buildPath = path.resolve(__dirname, './dist');
const srcPath = path.resolve(__dirname, './src');
const TransferWebpackPlugin = require('transfer-webpack-plugin');
const config = {
entry: {
devServer: 'webpack/hot/only-dev-server',
index: "./src/app/index.jsx"
},
resolve: {
extensions: [".js", ".jsx"],
},
plugins: [
//Moves files
new TransferWebpackPlugin([
{from: 'www'},
], path.resolve(__dirname, "./src")),
],
output: {
path: buildPath, //Path of output file
filename: '[name].js',
},
mode: "development",
module: {
rules: [
{
test: /\.js$|\.jsx$/,
include: [srcPath],
use: {
loader: "babel-loader",
options: {
presets: ['es2015', 'react']
}
}
},
],
},
//Server Configuration options
devServer: {
contentBase: 'src/www', //Relative directory for base of server
hot: true, //Live-reload
inline: true,
port: 3000, //Port Number
host: 'localhost', //Change to '0.0.0.0' for external facing server
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
],
};
module.exports = config;
webpack-dev-server should serve the application in IE 11 without error.
Error in javascript-console: SCRIPT438: Object doesn't support property or method "includes"
The problem is the use of Array.includes() in webpack-dev-server which is not supported by IE 11.
Clone this repository:
https://github.com/Q-Man/webpack-dev-server-ie-fail
I was having this issue too. Looks like they're taking care of it.
https://github.com/webpack/webpack/commit/fcf634c81956b7959f83bc9f140db37cc628e92a#diff-f995afcfa4e47968fef81836a5da0bca
Looks like it's fixed in the last release! Let us rejoice!
Yes, it's working now with webpack 4.2.0. I'm closing this issue.
I know this has apparently been fixed in webpack 4.2.0, but I'm seeing the same exact issue in webpack 4.5.0
Any idea how this could happen?
I seem to have got some versioning issues here, and ended up on the wrong webpack version.
Ok. It's working for me in webpack 4.5.0
Most helpful comment
Looks like it's fixed in the last release! Let us rejoice!
https://github.com/webpack/webpack/releases/tag/v4.2.0