diff --git a/package.json b/package.json index 27e7b15..f4033ce 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/main.js b/src/main.js index 8a63cb9..665b29f 100644 --- a/src/main.js +++ b/src/main.js @@ -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"; diff --git a/webpack.common.js b/webpack.common.js index e0cefb8..4ade5ea 100644 --- a/webpack.common.js +++ b/webpack.common.js @@ -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" diff --git a/yarn.lock b/yarn.lock index 67a285e..cbd95c6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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: