Ver Fonte

WIP: upgrade babel

Yuki Takei há 6 anos atrás
pai
commit
46eb9814b0
4 ficheiros alterados com 16 adições e 19 exclusões
  1. 9 8
      .babelrc
  2. 0 1
      config/webpack.dev.dll.js
  3. 6 8
      package.json
  4. 1 2
      src/client/js/ie11-polyfill.js

+ 9 - 8
.babelrc

@@ -1,16 +1,17 @@
 {
   "plugins": [
     "lodash",
-    ["transform-runtime", {
-      "regenerator": true
-    }]
   ],
   "presets": [
-    ["env", {
-      "targets": {
-        "browsers": ["last 2 versions"]
+    [
+      "@babel/preset-env",
+      {
+        "targets": {
+          "node": "current",
+        },
+        "useBuiltIns": "usage",
       }
-    }],
-    "react"
+    ],
+    "@babel/preset-react"
   ]
 }

+ 0 - 1
config/webpack.dev.dll.js

@@ -11,7 +11,6 @@ module.exports = {
     dlls: [
       // Libraries
       'axios',
-      'babel-polyfill',
       'browser-bunyan', 'bunyan-format',
       'codemirror', 'react-codemirror2',
       'date-fns',

+ 6 - 8
package.json

@@ -135,16 +135,15 @@
   },
   "devDependencies": {
     "@alienfast/i18next-loader": "^1.0.16",
+    "@babel/core": "^7.4.3",
+    "@babel/polyfill": "^7.4.3",
+    "@babel/preset-env": "^7.4.3",
+    "@babel/preset-react": "^7.0.0",
     "@handsontable/react": "^2.0.0",
     "autoprefixer": "^9.0.0",
-    "babel-core": "^6.25.0",
     "babel-eslint": "^10.0.1",
-    "babel-loader": "^7.1.1",
-    "babel-plugin-lodash": "^3.3.2",
-    "babel-plugin-transform-runtime": "^6.23.0",
-    "babel-polyfill": "^6.26.0",
-    "babel-preset-env": "^1.6.0",
-    "babel-preset-react": "^6.24.1",
+    "babel-loader": "^8.0.5",
+    "babel-plugin-lodash": "^3.3.4",
     "bootstrap-sass": "^3.4.1",
     "bootstrap-select": "^1.12.4",
     "browser-bunyan": "^1.3.0",
@@ -190,7 +189,6 @@
     "morgan": "^1.9.0",
     "node-dev": "^4.0.0",
     "node-sass": "^4.11.0",
-    "nodelist-foreach-polyfill": "^1.2.0",
     "normalize-path": "^3.0.0",
     "null-loader": "^3.0.0",
     "on-headers": "^1.0.1",

+ 1 - 2
src/client/js/ie11-polyfill.js

@@ -1,2 +1 @@
-import 'nodelist-foreach-polyfill';
-import 'babel-polyfill';
+import '@babel/polyfill';