You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-9Lines changed: 10 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -70,7 +70,7 @@ You have now created an initial [package.json](https://github.com/jansoren/react
70
70
```
71
71
72
72
1. Install React DOM and add it to your package.json file automatically using `npm install --save react react-dom`
73
-
1. Install Babel to transform the content of a .js file from ES6 to ES5 `npm install --save-dev babel-preset-react babel-preset-es2015 babel-core babel-loader`
73
+
1. Install Babel to transform the content of a .js file from ES6 to ES5 `npm install --save-dev babel-core babel-loader babel-preset-env babel-preset-react`
74
74
1. In your `webpack.config.js` add the babel-loader that you just installed like this:
75
75
```javascript
76
76
var config = {
@@ -82,11 +82,11 @@ You have now created an initial [package.json](https://github.com/jansoren/react
82
82
exclude:/node_modules/,
83
83
loader:'babel-loader',
84
84
query: {
85
-
presets: ['react', 'es2015']
85
+
presets: ['react', 'env']
86
86
}
87
87
}
88
88
],
89
-
},
89
+
}
90
90
};
91
91
```
92
92
@@ -107,12 +107,13 @@ You have now created an initial [package.json](https://github.com/jansoren/react
107
107
108
108
1. Run command `webpack` in your main folder that will result in something like this:
109
109
```
110
-
Hash: dd141258ef660950584c
111
-
Version: webpack 1.12.11
112
-
Time: 3711ms
113
-
Asset Size Chunks Chunk Names
114
-
bundle.js 676 kB 0 [emitted] main
115
-
+ 159 hidden modules
110
+
Hash: 35d746ba5bf01c587890
111
+
Version: webpack 3.10.0
112
+
Time: 829ms
113
+
Asset Size Chunks Chunk Names
114
+
bundle.js 728 kB 0 [emitted] [big] main
115
+
[81] ./main.js 572 bytes {0} [built]
116
+
+ 183 hidden modules
116
117
```
117
118
118
119
1. Open `/dist/index.html` to see your client side application
0 commit comments