Skip to content

hanpanpan200/simple-react-webpack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simple-react-webpack-es2015-demo

Goal of this demo

This demo is going to show how to set up a ReactJS application in ES2015 with webpack.

Prerequisites

  • You know requireJS or something similiar
  • You know ES2015 and Babel
  • You know something about ReactJS

How to run

  • webpack -> moudle bundler
  • Babel -> transpiles the code into standard ES5 code that can run in older JavaScript environments

install packages with npm:

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

Commands:

Build for development:

webpack

Build for production:

webpack -p

Build for continuous incremental build in development:

webpack --watch

Run webpack server:

webpack-dev-server --progress --colors

How to visit

open http://localhost:8080/webpack-dev-server/

Additional resources

I refered to Pete Hunt's webpack-how-to to build this application, hope that can be helpful to you.

About

This is a simple demo for how to set up React for ES6 with webpack.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published