Today I recorded a screencast of me doing this presentation so you can view even if you weren’t able to make it to the meetup. In it I do the following:
- Set up Webpack and the Webpack Dev Server.
- Configure Webpack to transpile ES2015 and JSX through Babel.
- Add the react-hot-loader plugin to enable hot reloading of React components.
- Build a small counter application to demonstrate and take advantage of hot loading.
- Create a production Webpack config that can bundle our application into production.
You can find the repository containing all the code on GitHub. Feel free to fork it or raise an issue if you come across problems.
In future videos I’ll cover:
- Testing React using Node, JSDOM and Tape
- Clever bundling using Webpack to create multiple files
- Quicker rebuilds with the Webpack DLL plugin
- And whatever else you’d like to see :)
Don't miss my latest course on Testing React with Enyzme and Jest! The first five videos are free and available to watch now. You'll learn how to write testable React code, test complex components and use Jest and Enzyme effectively to write clean, thorough tests. Get started now.
Subscribe to keep up to date with the latest content.
Join the JS Playground mailing list to be kept up to date with the latest tutorials, screencasts and more. You won't be spammed and you can unsubscribe at any time.