From 462b4a13a2b07854b489a56276f25f9dbe576482 Mon Sep 17 00:00:00 2001 From: Balazs Gobel Date: Fri, 1 Feb 2019 12:22:25 +0100 Subject: [PATCH] Load babel only once for a page - Fixed when having multiple visualisations on one page - Babel will load only once --- src/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index e9524b1..fbe6d4a 100644 --- a/src/index.js +++ b/src/index.js @@ -1,8 +1,11 @@ -import '@babel/polyfill'; import paint from './paint'; import definition from './definition'; import './main.less'; +if (!window._babelPolyfill) { // eslint-disable-line no-underscore-dangle + require('@babel/polyfill'); // eslint-disable-line global-require +} + export default { controller: [ '$scope',