Skip to content

asithub/react-firstapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ReactJS First Application

This read note is for first time npm installation

Step 1

Created a new folder with name "react-firstapp"

Step 2

npm command to initialize this new app

npm init

Step 3

Npm command to install react dependencies and save it in package.json file

npm install react react-dom react-jsx --save

Step 4

Npm command to install react Dev Dependencies and save in package.json file.

npm install babel-core babel-loader babel-preset-es2015 babel-preset-react babel-preset-stage-2 webpack webpack-dev-server --save-dev

Step 5

Inside the root application directory, manually create below files and folders

  • react-firstapp/webpack.config.js (file)
  • react-firstapp/src (Folder)
  • react-firstapp/src/index.html (file)
  • react-firstapp/src/app (Folder)
  • react-firstapp/src/app/index.js (file)

Step 6

Take the reference and update webpack.config.js

Step 7

For package.json, update the auto generated scripts notation with below

"scripts": {
      "start": "npm run build",
      "build": "webpack -d && xcopy "src/index.html" "dist/" /F /Y && webpack-dev-server --content-base src/ --inline",
      "build:prod": "webpack -p && xcopy "src/index.html" "dist/" /F /Y"
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published