Upgrade to Babel 6.x

master
Tanner Collin 7 years ago
parent 86f23ed1a4
commit 1dbc088d17
  1. 15
      .babelrc
  2. 15
      package.json
  3. 6
      src/index.js
  4. 2
      src/ui/Home.js
  5. 2
      webpack.config.js
  6. 12
      webpack.production.config.js

@ -1,3 +1,14 @@
{
"stage": 0
}
"presets": [
"es2015",
"react"
],
"env": {
"production": {
"plugins": [
"transform-react-constant-elements",
"transform-react-inline-elements"
]
}
}
}

@ -3,8 +3,8 @@
"version": "1.0.0",
"description": "Send browser notifications from your terminal. No installation. No registration.",
"repository": {
"type" : "git",
"url" : "https://github.com/tannercollin/Notica"
"type": "git",
"url": "https://github.com/tannercollin/Notica"
},
"scripts": {
"dev": "node serverdev.js",
@ -15,9 +15,16 @@
"author": "Tanner Collin (http://github.com/tannercollin)",
"license": "MIT",
"devDependencies": {
"babel-core": "^5.4.7",
"babel-core": "^6.21.0",
"babel-eslint": "^3.1.9",
"babel-loader": "^5.1.2",
"babel-loader": "^6.2.10",
"babel-plugin-transform-react-constant-elements": "^6.9.1",
"babel-plugin-transform-react-inline-elements": "^6.8.0",
"babel-preset-es2015": "^6.18.0",
"babel-preset-es2016": "^6.16.0",
"babel-preset-es2017": "^6.16.0",
"babel-preset-latest": "^6.16.0",
"babel-preset-react": "^6.16.0",
"eslint-plugin-react": "^2.3.0",
"react-hot-loader": "^1.2.7",
"webpack": "^1.9.6",

@ -1,9 +1,9 @@
import React from 'react'
import { Router, Route, browserHistory } from 'react-router'
import React from 'react';
import { Router, Route, browserHistory } from 'react-router';
import Site from './ui/Site';
React.render((
<Router history={browserHistory}>
<Route path="/*" component={Site} />
</Router>
), document.getElementById('root'))
), document.getElementById('root'));

@ -77,7 +77,7 @@ export default class Home extends React.Component {
} catch (e) { // If we are on a browser without serviceWorker
this.setState({registration: false});
}
}.bind(this));
});
}
}

@ -23,7 +23,7 @@ module.exports = {
module: {
loaders: [{
test: /\.js$/,
loaders: ['react-hot', 'babel'],
loaders: ['react-hot', 'babel-loader'],
include: path.join(__dirname, 'src')
}]
}

@ -13,22 +13,22 @@ module.exports = {
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
}
}),
new webpack.DefinePlugin({
'process.env': {
'NODE_ENV': JSON.stringify('production')
}
}),
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
}
}),
new webpack.NoErrorsPlugin()
],
module: {
loaders: [{
test: /\.js$/,
loaders: ['babel'],
loaders: ['babel-loader'],
include: path.join(__dirname, 'src')
}]
}

Loading…
Cancel
Save