@nrwl/angular:webpack-dev-server
The webpack-dev-server executor is very similar to the standard dev server builder provided by the Angular Devkit. It is usually used in tandem with @nrwl/angular:webpack-browser
when your Angular application uses a custom webpack configuration.
Options can be configured in project.json
when defining the executor, or when invoking it. Read more about how to configure targets and executors here: https://nx.dev/reference/project-configuration#targets.
Seving an application with a custom webpack configuration
This executor should be used along with @nrwl/angular:webpack-browser
to serve an application using a custom webpack configuration.
Your project.json
file should contain a build
and serve
target that matches the following:
"build": {
"executor": "@nrwl/angular:webpack-browser",
"options": {
...
"customWebpackConfig": {
"path": "apps/appName/webpack.config.js"
}
}
},
"serve": {
"executor": "@nrwl/angular:webpack-dev-server",
"configurations": {
"production": {
"browserTarget": "appName:build:production"
},
"development": {
"browserTarget": "appName:build:development"
}
},
"defaultConfiguration": "development",
}