Skip to content

Commit

Permalink
Updates to "babel@7"
Browse files Browse the repository at this point in the history
  • Loading branch information
kettanaito committed Sep 21, 2018
1 parent 8531ad0 commit 0aa5988
Show file tree
Hide file tree
Showing 8 changed files with 10,312 additions and 5,873 deletions.
9 changes: 0 additions & 9 deletions .babelrc

This file was deleted.

22 changes: 22 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
module.exports = {
presets: [
[
'@babel/preset-env', {
modules: false
}
],
'@babel/preset-react',
'@babel/preset-flow',
],
plugins: [
// '@babel/plugin-transform-modules-commonjs',
'@babel/plugin-proposal-export-default-from',
'@babel/plugin-proposal-export-namespace-from',
'@babel/plugin-proposal-object-rest-spread',
],
env: {
test: {
presets: ['@babel/preset-env', '@babel/preset-react']
}
}
}
4 changes: 0 additions & 4 deletions examples/.babelrc

This file was deleted.

11 changes: 11 additions & 0 deletions examples/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = {
presets: [
'@babel/preset-env',
'@babel/preset-react',
],
plugins: [
'@babel/plugin-proposal-object-rest-spread',
'@babel/plugin-proposal-export-default-from',
'@babel/plugin-proposal-export-namespace-from',
]
}
7 changes: 4 additions & 3 deletions examples/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
const path = require('path')
const webpackConfig = require('../webpack.config')

const config = {
const nodeEnv = process.env.NODE_ENV

module.exports = {
mode: nodeEnv,
entry: path.resolve(__dirname, 'index'),
output: {
filename: 'index.js',
Expand Down Expand Up @@ -29,5 +32,3 @@ const config = {
historyApiFallback: true,
},
}

module.exports = config

0 comments on commit 0aa5988

Please sign in to comment.