Skip to content

Commit

Permalink
Fixed webpack/babel polyfill issue
Browse files Browse the repository at this point in the history
  • Loading branch information
sambua committed Oct 4, 2018
1 parent acbaf7a commit 613ecb4
Show file tree
Hide file tree
Showing 8 changed files with 557 additions and 532 deletions.
1,069 changes: 544 additions & 525 deletions build/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/index.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions build/index.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/index.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-ziggeo",
"version": "3.1.0",
"version": "3.1.1",
"description": "Ziggeo's react component for easy react application deployment",
"main": "build/index",
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import './require-babel-polyfill';
import 'ziggeo-client-sdk/build/ziggeo.css';
import 'ziggeo-client-sdk/build/ziggeo.js';

Expand Down
6 changes: 6 additions & 0 deletions src/require-babel-polyfill.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default (() => {
if((typeof window !== 'undefined' && !window._babelPolyfill) ||
(typeof global !== 'undefined' && !global._babelPolyfill)) {
require('babel-polyfill');
}
})()
1 change: 0 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ const pkg = JSON.parse(fs.readFileSync('./package.json').toString());
module.exports = {
devtool: 'source-map',
entry: [
"babel-polyfill",
'./src/index.js'
],
output: {
Expand Down

0 comments on commit 613ecb4

Please sign in to comment.