Skip to content

Commit

Permalink
upgrade babel to 7 (#805)
Browse files Browse the repository at this point in the history
  • Loading branch information
sorrycc authored Sep 6, 2018
1 parent f6d095d commit 561d8ce
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 14 deletions.
24 changes: 13 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@
]
},
"dependencies": {
"@babel/core": "7.0.0-beta.46",
"@babel/polyfill": "7.0.0-beta.46",
"@babel/runtime": "7.0.0-beta.46",
"af-webpack": "^0.22.2",
"@babel/core": "^7.0.0",
"@babel/polyfill": "^7.0.0",
"@babel/runtime": "^7.0.0",
"af-webpack": "^0.23.0-beta.1",
"atool-monitor": "^0.4.3",
"babel-plugin-add-module-exports": "^0.2.1",
"babel-preset-umi": "^0.3.0",
"babel-preset-umi": "^1.0.0",
"body-parser": "^1.17.2",
"chalk": "^1.1.3",
"chokidar": "^1.7.0",
Expand All @@ -56,16 +56,18 @@
"lodash.escaperegexp": "^4.1.2",
"parse-json-pretty": "^0.1.0",
"strip-json-comments": "^2.0.1",
"umi-test": "^0.5.5",
"umi-test": "^0.6.0-beta.1",
"update-notifier": "^2.3.0",
"yargs": "^8.0.1"
},
"devDependencies": {
"@babel/cli": "7.0.0-beta.46",
"@babel/core": "7.0.0-beta.46",
"@babel/preset-env": "7.0.0-beta.46",
"@babel/preset-react": "7.0.0-beta.46",
"@babel/preset-stage-0": "7.0.0-beta.46",
"@babel/cli": "^7.0.0",
"@babel/core": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@babel/preset-react": "^7.0.0",
"@babel/plugin-proposal-class-properties": "^7.0.0",
"@babel/plugin-proposal-do-expressions": "^7.0.0",
"@babel/plugin-proposal-export-default-from": "^7.0.0",
"babel-eslint": "^8.0.2",
"eslint": "^4.10.0",
"eslint-config-airbnb": "^16.1.0",
Expand Down
14 changes: 11 additions & 3 deletions scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const babel = require('@babel/core');
const through = require('through2');
const chalk = require('chalk');
const rimraf = require('rimraf');
const { readdirSync, readFileSync, writeFileSync } = require('fs');
const { readFileSync, writeFileSync } = require('fs');
const { join } = require('path');
const chokidar = require('chokidar');

Expand All @@ -17,7 +17,11 @@ const nodeBabelConfig = {
},
},
],
[require.resolve('@babel/preset-stage-0'), { decoratorsLegacy: true }],
],
plugins: [
require.resolve('@babel/plugin-proposal-export-default-from'),
require.resolve('@babel/plugin-proposal-do-expressions'),
require.resolve('@babel/plugin-proposal-class-properties'),
],
};
const browserBabelConfig = {
Expand All @@ -29,7 +33,11 @@ const browserBabelConfig = {
},
],
require.resolve('@babel/preset-react'),
[require.resolve('@babel/preset-stage-0'), { decoratorsLegacy: true }],
],
plugins: [
require.resolve('@babel/plugin-proposal-export-default-from'),
require.resolve('@babel/plugin-proposal-do-expressions'),
require.resolve('@babel/plugin-proposal-class-properties'),
],
};

Expand Down

0 comments on commit 561d8ce

Please sign in to comment.