Skip to content
This repository has been archived by the owner on Feb 7, 2022. It is now read-only.

Commit

Permalink
Ensure compatibility with Internet Explorer
Browse files Browse the repository at this point in the history
We need to include babel-polyfill in our application as older versions
of Internet Explorer are not capable of the latest EcmaScript features
and functionality.

facebook/react#8379
https://babeljs.io/docs/en/babel-polyfill.html
  • Loading branch information
jbndbc committed Jun 27, 2018
1 parent 077a405 commit 0ff5926
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"test": "node_modules/.bin/mocha --require babel-core/register --recursive"
},
"dependencies": {
"babel-polyfill": "6.26.0",
"body-parser": "1.18.2",
"busboy": "0.2.14",
"express": "4.16.2",
Expand Down
1 change: 1 addition & 0 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* See license text in LICENSE.txt or at https://opensource.dbc.dk/licenses/gpl-3.0/
*/

import "babel-polyfill";
import React from "react";
import ReactDOM from "react-dom";

Expand Down
5 changes: 4 additions & 1 deletion webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
const path = require("path");

module.exports = {
entry: path.resolve(__dirname, "src", "main.js"),
entry: [
'babel-polyfill',
path.resolve(__dirname, "src", "main.js")
],
output: {
path: path.resolve(__dirname, "src", "static", "js"),
filename: "bundle.js"
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ babel-plugin-transform-strict-mode@^6.24.1:
babel-runtime "^6.22.0"
babel-types "^6.24.1"

babel-polyfill@^6.26.0:
babel-polyfill@6.26.0, babel-polyfill@^6.26.0:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.26.0.tgz#379937abc67d7895970adc621f284cd966cf2153"
dependencies:
Expand Down

0 comments on commit 0ff5926

Please sign in to comment.