Skip to content

ostadomid/Simple-React-Boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

1️⃣ Instructions from scratch :

npm i --save express webpack react react-dom

npm i --save-dev babel-loader babel-core babel-preset-react babel-preset-es2015

npm i nodemon -g

2️⃣ Webpack Configuration

🔹 webpack.config.js 🔹

module.exports = {
    entry: './js/app.js',

    output: {
        path: './public',
       filename: 'bundle.js',
    },

 module: {

   loaders: [
    {
      test: /\.js$/,
      exclude: /(node_modules|bower_components)/,
      loader: 'babel', // 'babel-loader' is also a legal name to reference
      query: {
        presets: ['react','es2015']
      }
    }
  ]
 }
}

3️⃣ Running

Terminal 1

nodemon

Terminal 2

webpack -w -d

ℹ️

-w : watch for changes

-d : map files for debugging

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published