Tic Tac Toe example of React.js (id est this tutorial) using npm, babel and webpack.
Thanks to codementor.io guide.
In the project directory, install dependencies according to package.json file:
npm i
It will create the ./node_modules/ directory and update its content. Then, generate webpack bundle file and its ./src/client/public/ directory:
webpack -d
(or ./node_modules/.bin/webpack -d
)
If you are making changes, run webpack in watch mode:
npm run dev
This works thanks to package.json scripts configuration.
package.json file was created by:
npm init
Its dependencies were updated by:
npm i webpack -S
npm i react react-dom -S
npm i babel-core babel-loader babel-preset-es2015 babel-preset-react -S
.babelrc file could be deleted and its instructions added to package.json file:
"babelrc": false,
"babel": {
"presets": [
"es2015",
"react"
]
}