September 2017
Intermediate to advanced
120 pages
2h 47m
English
While the production build performs the best, it’s more comfortable to use a different build environment for development. Creating the production build is slow, and the -p switch and minification lose many helpful warnings and error messages.
To improve the development experience, we’ll create a separate build script for development and replace webpack with webpack-dev-server. webpack-dev-server is a web server that builds and serves the application bundle from memory, so that the build process takes less time. We’ll set up a second npm script with different environment variables to use the React development build, and we’ll keep our existing build script unchanged.
Install webpack-dev-server with npm:
| | $ npm i |
Read now
Unlock full access