Refer to webpack documentation
Step 1:
npm run webpack
open index.html in browser.
Step 2:
- Create file content.js
- Update entry.js
run npm webpack
Step 3: Introducing Style
- Create style.css
- Update entry.css
run npm install css-loader style-loader --save-dev
run npm run webpack
Step 4: Introduce webpack.config.js
- Add webpack.config.js
- remove style pre processor from entry.js
- Update package.json
run npm run webpack
Step 5: Configure webpack-dev-server
run npm install webpack-dev-server --save-dev
Update package.json
- Update package.json with necessary react dependencies
- Update content.js
- Update webpack config
- create .bablerc
#Cleaning up