My project consists of multiple dashboards, and I've decided to create separate scripts in my package.json for each one. Building all the dashboards during development when you only need to work on one can be time-consuming. So, I discovered that it's possible to launch a specific webpack configuration using a script like this:
"scripts": {
"dash1": "export NODE_ENV=development && webpack --config=webpack.dash1.config.js -d --watch --display-error-details export name=employee ",
"dash2": "export NODE_ENV=production && webpack --config=webpack.dash2.config.js --progress",
"dash3": "export NODE_ENV=development && webpack --config=webpack.dash3.config.js -d --watch --display-error-details",
}
To implement this, I will need to have three separate webpack config files where I can specify the proper entry files. But I'm curious if there is a way to pass a parameter in an npm script and then check it in the webpack config. Perhaps it's feasible to perform conditional checks for entries based on parameters transmitted from the npm script?