Backpack is a build system for building modern Node.js apps with zero or minimal configuration. It supports the latest JavaScript and handles the file watching, live reloading, transpiling, and bundling that we have been doing with webpack in the previous chapters. We can think of it as a wrapper of webpack, a simplified version of the webpack configuration that we have been using in this book so far. You can find out more info about Backpack at https://github.com/jaredpalmer/backpack. Now, let's find out how we can use it to speed up our app development in the coming sections.
Installing and configuring Backpack
Creating a modern Node.js app with Backpack can be as easy as implementing the following steps:
- Install Backpack via npm:
$ npm i backpack-core
- Create a /src/ directory and a package.json file in the project root with backpack in the dev script as follows:
{
"scripts": {
"dev": "backpack"
}
}
Note that you must provide...