React, first steps (Webpack and Babel)

  • As these packages are all development devepdancies only we’ll install them doing the following:

    Our should now have the following packages:

    Lets first configure babel so it knows how to transpile our code how we need it to.

  • We’ll create a file for our babel settings.
  • This file just contains some json with some settings which tell babel how to behave.
  • Now we need to set up webpack to use babel and bundle the javascript for us to use in our site.
  • Finally, in order for us to compile the javascript, we need to install the webpack package globally:

    We can then just run:

    This should create in .

Getting started with React can be a big hurdle. Before you can get started creating your react app, youll need an environment that compiles ES6 into Javascri…
Continue reading “React, first steps (Webpack and Babel)”