N
N
Ninja Mate2016-06-28 19:17:01
JavaScript
Ninja Mate, 2016-06-28 19:17:01

How to run an EI compatible Babel+Webpack build?

There is a ReactJs application that works fine on chrome, but when used on IE, there are problems with third-party libraries D3, Big Calendar and others. How to set up a build in compatibility mode?
Mistakes


Object doesn't support property or method 'assign'
'rethrowCaughtError' is undefined
in react-big-calendar library doesn't render events but no error

product assembly
var path = require('path');
var webpack = require('webpack');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
  devtool: 'source-map',
  entry: [
    './src/index'
  ],
  output: {
    path: path.join(__dirname, 'dist'),
    filename: 'bundle.js',
    chunkFilename: '[name].bundle.js'
  },
  plugins: [
    new webpack.optimize.OccurenceOrderPlugin(),
    new webpack.DefinePlugin({
      'process.env': {
        'NODE_ENV': JSON.stringify('production')
      }
    }),
    new ExtractTextPlugin('bundle.css'),
    new webpack.optimize.UglifyJsPlugin({
      compressor: {
        warnings: false
      }
    })
  ],
  module: {
    loaders: [{
      test: /\.js$/,
      loaders: ['babel'],
      include: path.join(__dirname, 'src')
    },
      {
        test: /\.css$/,
        loader: ExtractTextPlugin.extract('style-loader', 'css-loader')
      }
    ]
  }
};

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Shestakov, 2016-06-28
@victorzadorozhnyy

try babel-polyfill

module.exports = {
   entry: ['babel-polyfill', './src/index']
};

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question