From ce41896deb7f79b632233a7e9e203fdfcde5ab20 Mon Sep 17 00:00:00 2001 From: noraiz-anwar Date: Fri, 9 Nov 2018 14:57:10 +0500 Subject: [PATCH] add babel-polyfill in commons --- common/static/js/src/ReactRenderer.jsx | 4 ---- webpack.common.config.js | 3 ++- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/common/static/js/src/ReactRenderer.jsx b/common/static/js/src/ReactRenderer.jsx index 1876dfb478..db5a5f1764 100644 --- a/common/static/js/src/ReactRenderer.jsx +++ b/common/static/js/src/ReactRenderer.jsx @@ -1,10 +1,6 @@ import React from 'react'; import ReactDOM from 'react-dom'; -// babel-polyfill must be imported last because of https://github.com/facebook/react/issues/8379 -// which otherwise causes "Objects are not valid as a react child" errors in IE11. -import 'babel-polyfill'; - class ReactRendererException extends Error { constructor(message) { super(`ReactRendererException: ${message}`); diff --git a/webpack.common.config.js b/webpack.common.config.js index e4602d30e5..3ed9cb8d4b 100644 --- a/webpack.common.config.js +++ b/webpack.common.config.js @@ -79,7 +79,8 @@ module.exports = Merge.smart({ ReactRenderer: './common/static/js/src/ReactRenderer.jsx', XModuleShim: 'xmodule/js/src/xmodule.js', - VerticalStudentView: './common/lib/xmodule/xmodule/assets/vertical/public/js/vertical_student_view.js' + VerticalStudentView: './common/lib/xmodule/xmodule/assets/vertical/public/js/vertical_student_view.js', + commons : 'babel-polyfill', }, output: {