mirror of
https://github.com/zhigang1992/react-content-loader.git
synced 2026-03-28 22:46:40 +08:00
upgrade babel 7 (#105)
This commit is contained in:
11
.babelrc.js
11
.babelrc.js
@@ -3,5 +3,14 @@ const modules = BABEL_ENV === 'cjs' || NODE_ENV === 'test' ? 'commonjs' : false
|
||||
const loose = true
|
||||
|
||||
module.exports = {
|
||||
presets: [['env', { modules, loose, targets: { uglify: true } }], 'stage-2', 'react', 'flow'],
|
||||
presets: [
|
||||
[
|
||||
'@babel/preset-env', {
|
||||
modules,
|
||||
loose
|
||||
}
|
||||
],
|
||||
'@babel/preset-react',
|
||||
'@babel/preset-flow'
|
||||
],
|
||||
}
|
||||
|
||||
13117
package-lock.json
generated
13117
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
18
package.json
18
package.json
@@ -43,12 +43,16 @@
|
||||
"prepush": "npm run test"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.1.2",
|
||||
"@babel/polyfill": "^7.0.0",
|
||||
"@babel/preset-env": "^7.1.0",
|
||||
"@babel/preset-flow": "^7.0.0",
|
||||
"@babel/preset-react": "^7.0.0",
|
||||
"@babel/register": "^7.0.0",
|
||||
"@babel/runtime": "^7.0.0",
|
||||
"@storybook/react": "^3.4.11",
|
||||
"babel-core": "^6.26.3",
|
||||
"babel-core": "^7.0.0-bridge.0",
|
||||
"babel-eslint": "^10.0.1",
|
||||
"babel-plugin-external-helpers": "^6.22.0",
|
||||
"babel-polyfill": "^6.26.0",
|
||||
"babel-runtime": "^6.26.0",
|
||||
"chai": "^4.1.2",
|
||||
"chai-enzyme": "^1.0.0-beta.0",
|
||||
"cross-env": "^5.1.3",
|
||||
@@ -65,10 +69,10 @@
|
||||
"prettier": "^1.6.1",
|
||||
"react": "^16.1.1",
|
||||
"react-dom": "^16.1.1",
|
||||
"rollup": "0.53",
|
||||
"rollup-plugin-babel": "^3.0.3",
|
||||
"rollup": "0.66.4",
|
||||
"rollup-plugin-babel": "^4.0.3",
|
||||
"rollup-plugin-replace": "^2.0.0",
|
||||
"rollup-plugin-uglify": "^2.0.1"
|
||||
"rollup-plugin-uglify": "^6.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "^15.0.0-0 || ^16.0.0-0"
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
import babel from 'rollup-plugin-babel'
|
||||
import replace from 'rollup-plugin-replace'
|
||||
import uglify from 'rollup-plugin-uglify'
|
||||
import { uglify } from "rollup-plugin-uglify";
|
||||
import pkg from './package.json'
|
||||
|
||||
const mergeAll = (objs) => Object.assign({}, ...objs)
|
||||
|
||||
const commonPlugins = [
|
||||
babel({
|
||||
exclude: 'node_modules/**',
|
||||
plugins: ['external-helpers']
|
||||
exclude: 'node_modules/**'
|
||||
}),
|
||||
]
|
||||
|
||||
|
||||
@@ -23,5 +23,5 @@ global.navigator = {
|
||||
|
||||
documentRef = document
|
||||
|
||||
require('babel-core/register')
|
||||
require('babel-polyfill')
|
||||
require('@babel/register')
|
||||
require('@babel/polyfill')
|
||||
|
||||
Reference in New Issue
Block a user