From 4596bfa4f89fbee843d3f809de5b6bbca0702977 Mon Sep 17 00:00:00 2001 From: Aaron Robinson Date: Wed, 13 Sep 2017 09:43:42 -0500 Subject: [PATCH 1/2] README update --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 348205f..fb21d65 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ Create `client/index.html` - + ``` @@ -87,7 +87,7 @@ Update your browser window and you should see the alert `It works from content.j #### Add ES6 to our app We want to add ES6 to our application. Webpack can only handle ES5 natively, so we need the babel-loader to process js files written with ES6 down to ES5. We can install [any of the webpack loaders](http://webpack.github.io/docs/list-of-loaders.html) through `npm`. -Run `npm init`. Default options are fine. +Run `npm init`. Default options are fine. Just repeatedly hit . Run `npm install babel-loader --save-dev` ES6ify `client/content.js` @@ -104,7 +104,7 @@ alert(`${greeting} and with ES6!!`) ``` Now, we can use a special flag in our CLI to send all `.js` files through babel. Recompile your beautiful new ES6 app: -`webpack ./client/app.js ./client/bundle.js --module-bind 'js=babel'` +`webpack ./client/app.js ./client/bundle.js --module-bind 'js=babel-loader'` Update your browser window and you should see the alert `It works from content.js` From 3e8cd4a3efcfd55eb5524855778cc2687ef3305b Mon Sep 17 00:00:00 2001 From: Aaron Robinson Date: Wed, 13 Sep 2017 09:46:19 -0500 Subject: [PATCH 2/2] Added install of babel-core --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fb21d65..1aab57c 100644 --- a/README.md +++ b/README.md @@ -87,8 +87,9 @@ Update your browser window and you should see the alert `It works from content.j #### Add ES6 to our app We want to add ES6 to our application. Webpack can only handle ES5 natively, so we need the babel-loader to process js files written with ES6 down to ES5. We can install [any of the webpack loaders](http://webpack.github.io/docs/list-of-loaders.html) through `npm`. -Run `npm init`. Default options are fine. Just repeatedly hit . -Run `npm install babel-loader --save-dev` +Run `npm init`. Default options are fine. Just repeatedly hit enter. + +Run `npm install babel-core babel-loader --save-dev` ES6ify `client/content.js` ```js