I am implementing React JS, with Webpack and Babel. However, I am having trouble getting Fetch to work with IE 11.
I have the following in my .babelrc file:
{
"presets" : ["env", "stage-0", "react"]
}
and the following in my webpack.config.js file:
var webpack = require('webpack');
var path = require('path');
var DIST_DIR = path.resolve(__dirname, 'dist');
var SRC_DIR = path.resolve(__dirname, 'src');
var config = {
entry: {
bundle: [
'babel-polyfill',
SRC_DIR + '/app/index.js',
]
},
output: {
path: DIST_DIR + '/public/js',
filename: 'bundle.js'
},
module: {
loaders: [
{
test: /\.jsx?$/,
include: SRC_DIR,
loader: 'babel-loader'
}
]
}
};
module.exports = config;
From my understanding implementing babel-preset-env, stage-0, and babel-polyfill should have allowed for the Fetch API to be transpiled into something older browsers could understand. Is there something else that I am missing?