- React app.
- Babel to parse ES6+ to ES5.
- Bundle all JavaScript files in one output .js file.
- Use EsLint to create front-end coding rules for all co-work developers.
- Using webpack-hot-module-replacement
- Using react-hot-loader
- node.js (npm) in your computer.
- webpack gobal command
$ npm install webpack -g
- webpack
- webpack-dev-server
- babel-cli
- babel-loader
- babel-preset-es2015
- babel-preset-react
- babel-preset-stage-0
- react
- react-dom
- react-hot-loader
- Download this repository zip file and extract as a folder.
- Use command(windows) / terminal(OSX or Linux) shell to cd this folder.
- Command "npm install" to install all plungin.
- Command "npm run dev" to develope this app with hot-reload.
- Run 'http://localhost:3000' in browser.
don't forget to run "npm install" first.
- Command "npm run build" to bundle .js file to production code.
- Describe your project, and let npm know what plungins it should to install.
- Define script shortcut of your project.
- Define babel presettings of your project.
- Plungins with Babel like react-hot-loader.
- Define webpack entry, output, plungins and loaders.
- Define webpack's behavior on development or production.
- Rule coding style in ide plungin(ex: ESLint of Sublime Text 3).
- See more setting in ESLint 詳細設定說明
- define your development behavior on your localhost with webpack-dev-server.
- import and export in all .js files is let Webpack to build dependency in your bundle.js.
- you can see more description in Webpack settings
- shiningjason1989 help me to set this project and told me how to use it.