I have a very simple javascript project that uses webpack (^ 2.6.0) as a module. There is one dependency as a provider module, and I have one entry point. My configuration is as follows:
const path = require('path'); const webpack = require('webpack'); module.exports = { entry: { bundle: './modules/main.js', vendor: ['react'] }, output: { path: path.join(__dirname, 'build'), filename: '[name].js', chunkFilename: '[id].js' }, plugins: [ new webpack.optimize.CommonsChunkPlugin({ name: "vendor" }) ] };
This creates bundle.js and vendor.js . The vendor package also contains the webpack-bootstrap code, which loads before any of my modules load. Now, indicating that the bootstrap code indicates that in line 40 the web packet generated
var resolvedPromise = new Promise(function(resolve) { resolve(); });
Unfortunately, Promise is not available in IE11, and even if you include a polyfill that includes Promise (like import 'babel-polyfill' ) as the first thing at the entry point or even as your own entry point, it will never be executed before running the bootstrap code, which means that I cannot use this code in IE11 unless I manually enable Promise-polyfill in front of my webpack packages. Not surprisingly, IE11 throws a Promise is not defined error before I get any code or even a vendor package.
Am I missing something or is this the expected behavior? I cannot find anything in webpack docs to counter this problem.
source share