@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:
1"build": {
2 "executor": "@nrwl/angular:webpack-browser",
3 "options": {
4 ...
5 "customWebpackConfig": {
6 "path": "apps/appName/webpack.config.js"
7 }
8 }
9},
10"serve": {
11 "executor": "@nrwl/angular:webpack-dev-server",
12 "configurations": {
13 "production": {
14 "browserTarget": "appName:build:production"
15 },
16 "development": {
17 "browserTarget": "appName:build:development"
18 }
19 },
20 "defaultConfiguration": "development",
21}
22