Skip to content
This repository was archived by the owner on Jul 24, 2018. It is now read-only.

Commit aff1174

Browse files
committed
Fix for windows
1 parent 97b5c3b commit aff1174

File tree

3 files changed

+39
-28
lines changed

3 files changed

+39
-28
lines changed

package.json

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
{
22
"name": "react-example-2015",
33
"version": "1.0.0",
4-
"description": "This is a short performance demo I am making to benchmark how React is performing against in the Devtools profiles.",
4+
"description": "React es15 in best practice style.",
55
"main": "webpack.config.js",
66
"devDependencies": {
7-
"babel-core": "^5.6.17",
8-
"babel-loader": "^5.3.1",
7+
"babel": "^6.5.2",
8+
"babel-core": "^5.8.38",
9+
"babel-loader": "^5.4.0",
10+
"babel-preset-es2015": "^6.6.0",
911
"css-loader": "^0.15.2",
1012
"cssesc": "^0.1.0",
1113
"flatten": "0.0.1",
@@ -14,17 +16,17 @@
1416
"indexes-of": "^1.0.1",
1517
"node-libs-browser": "^0.5.2",
1618
"react": "^0.14.7",
17-
"react-dom": "^0.14.3",
18-
"react-hot-loader": "^1.2.8",
19+
"react-dom": "^0.14.7",
20+
"react-hot-loader": "^1.3.0",
1921
"style-loader": "^0.12.3",
20-
"webpack": "^1.10.1",
21-
"webpack-dev-server": "^1.14.0",
22-
"webpack-merge": "^0.1.2"
22+
"webpack": "^1.12.14",
23+
"webpack-dev-server": "^1.14.1",
24+
"webpack-merge": "^0.1.3"
2325
},
2426
"private": true,
2527
"scripts": {
26-
"build": "TARGET=build webpack",
27-
"start": "TARGET=dev webpack-dev-server --devtool eval-source --progress --colors --hot --inline --history-api-fallback"
28+
"build": "webpack",
29+
"start": "webpack-dev-server --devtool eval-source --progress --colors --hot --inline --history-api-fallback"
2830
},
2931
"repository": {
3032
"type": "git",

webpack.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
var path = require('path');
22
var merge = require('webpack-merge');
33
var webpack = require('webpack');
4-
var TARGET = process.env.TARGET;
4+
var TARGET = process.env.TARGET || 'dev';
55
var ROOT_PATH = path.resolve(__dirname);
66
var HtmlWebpackPlugin = require('html-webpack-plugin');
77

@@ -28,7 +28,7 @@ var common = {
2828
loaders: [
2929
{
3030
test: /\.jsx?$/,
31-
loaders: ['react-hot', 'babel?stage=1'],
31+
loaders: ['babel'],
3232
include: path.resolve(ROOT_PATH, 'app')
3333
},
3434

webpack.development.js

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,31 @@ var ROOT_PATH = path.resolve(__dirname);
33

44

55
module.exports = {
6-
entry: [
7-
'webpack/hot/dev-server',
8-
path.resolve(ROOT_PATH, 'app/main')
9-
],
6+
entry: [
7+
'webpack/hot/dev-server',
8+
path.resolve(ROOT_PATH, 'app/main')
9+
],
1010

11-
output: {
12-
path: path.resolve(ROOT_PATH, 'build'),
13-
filename: 'bundle.js'
14-
},
11+
output: {
12+
path: path.resolve(ROOT_PATH, 'build'),
13+
filename: 'bundle.js'
14+
},
1515

16-
module: {
17-
loaders: [
18-
{
19-
test: /\.css$/,
20-
loaders: ['style', 'css']
21-
}
22-
]
23-
}
16+
module: {
17+
loaders: [
18+
{
19+
test: /\.css$/,
20+
loaders: ['style', 'css']
21+
},
22+
23+
{
24+
test: /\.jsx?$/,
25+
exclude: /(node_modules|bower_components)/,
26+
loader: 'babel', // 'babel-loader' is also a legal name to reference
27+
query: {
28+
presets: ['react', 'es2015']
29+
}
30+
}
31+
]
32+
}
2433
};

0 commit comments

Comments
 (0)