February 2019
Beginner to intermediate
180 pages
4h 4m
English
Now that we've seen how the toolchain works at a basic level, let's improve our developer experience so that we can start our project with just one command. We'll need to install a couple of dependencies, as follows:
npm install webpack-dev-server --save-devnpm install npm-run-all --save-dev
Now, we can update our npm scripts:
"scripts": { "start": "npm-run-all --parallel start:*", "start:bsb": "bsb -clean-world -make-world -w", "start:webpack": "webpack-dev-server --port 3000", "build": "npm-run-all build:*", "build:bsb": "bsb -clean-world -make-world", "build:webpack": "NODE_ENV=production webpack", "test": "echo \"Error: no test specified\" && exit 1"},
Next, to get webpack-dev-server to serve the index.html ...
Read now
Unlock full access