diff --git a/.babelrc b/.babelrc index caafb71..609b1f2 100644 --- a/.babelrc +++ b/.babelrc @@ -1,7 +1,44 @@ { - "presets": ["react", ["env", { - "targets": { - "browsers": ["safari >= 7", "ie 9"] - } - } ], "stage-0"] -} \ No newline at end of file + "presets": [ + "@babel/preset-react", + [ + "@babel/preset-env", + { + "targets": { + "browsers": [ + "safari >= 7", + "ie 9" + ] + } + } + ] + ], + "plugins": [ + "@babel/plugin-syntax-dynamic-import", + "@babel/plugin-syntax-import-meta", + "@babel/plugin-proposal-class-properties", + "@babel/plugin-proposal-json-strings", + [ + "@babel/plugin-proposal-decorators", + { + "legacy": true + } + ], + "@babel/plugin-proposal-function-sent", + "@babel/plugin-proposal-export-namespace-from", + "@babel/plugin-proposal-numeric-separator", + "@babel/plugin-proposal-throw-expressions", + "@babel/plugin-proposal-export-default-from", + "@babel/plugin-proposal-logical-assignment-operators", + "@babel/plugin-proposal-optional-chaining", + [ + "@babel/plugin-proposal-pipeline-operator", + { + "proposal": "minimal" + } + ], + "@babel/plugin-proposal-nullish-coalescing-operator", + "@babel/plugin-proposal-do-expressions", + "@babel/plugin-proposal-function-bind" + ] +} diff --git a/package.json b/package.json index d34575d..ebe8527 100644 --- a/package.json +++ b/package.json @@ -44,12 +44,27 @@ "prop-types": "^15.6.0" }, "devDependencies": { - "babel-core": "^6.13.2", - "babel-loader": "^6.2.4", - "babel-preset-env": "^1.6.1", - "babel-preset-react": "^6.11.1", - "babel-preset-stage-0": "^6.5.0", - "babel-polyfill": "^6.26.0", + "@babel/core": "^7.0.0", + "@babel/plugin-proposal-class-properties": "^7.0.0", + "@babel/plugin-proposal-decorators": "^7.0.0", + "@babel/plugin-proposal-do-expressions": "^7.0.0", + "@babel/plugin-proposal-export-default-from": "^7.0.0", + "@babel/plugin-proposal-export-namespace-from": "^7.0.0", + "@babel/plugin-proposal-function-bind": "^7.0.0", + "@babel/plugin-proposal-function-sent": "^7.0.0", + "@babel/plugin-proposal-json-strings": "^7.0.0", + "@babel/plugin-proposal-logical-assignment-operators": "^7.0.0", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0", + "@babel/plugin-proposal-numeric-separator": "^7.0.0", + "@babel/plugin-proposal-optional-chaining": "^7.0.0", + "@babel/plugin-proposal-pipeline-operator": "^7.0.0", + "@babel/plugin-proposal-throw-expressions": "^7.0.0", + "@babel/plugin-syntax-dynamic-import": "^7.0.0", + "@babel/plugin-syntax-import-meta": "^7.0.0", + "@babel/polyfill": "^7.0.0", + "@babel/preset-env": "^7.0.0", + "@babel/preset-react": "^7.0.0", + "babel-loader": "^8.0.0", "css-loader": "^0.26.1", "file-loader": "^0.11.2", "postcss-cli": "^4.1.0", diff --git a/src/require-babel-polyfill.js b/src/require-babel-polyfill.js index a2599bd..477e1a7 100644 --- a/src/require-babel-polyfill.js +++ b/src/require-babel-polyfill.js @@ -1,6 +1,6 @@ export default (() => { if((typeof window !== 'undefined' && !window._babelPolyfill) || (typeof global !== 'undefined' && !global._babelPolyfill)) { - require('babel-polyfill'); + require("@babel/polyfill"); } -})() \ No newline at end of file +})()