Creating the utils package
After we’ve created the devtools
package, it is time to add a basic utils
package to test the Webpack compilation with devtools
. For this, you will need to create a directory at packages/utils
. For the example in the book, we will just add one util
file to test our devtools
, but in the actual repository you will find way more util
files that have been added to the project.
As always let’s start creating our package.json
in the utils
package:
{
"name": "@web-creator/utils",
"version": "1.0.0",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
"dist"
],
"scripts": {
"build": "cross-env NODE_ENV=production npm-run-all clean compile webpack:production",
"build:dev": "cross-env NODE_ENV=development npm-run-all clean compile webpack:development",
...