UNPKG

@nx/angular

Version:

The Nx Plugin for Angular contains executors, generators, and utilities for managing Angular applications and libraries within an Nx workspace. It provides: - Integration with libraries such as Storybook, Jest, ESLint, Tailwind CSS, Playwright and Cypre

171 lines (170 loc) • 6.72 kB
{ "version": 2, "continuous": true, "outputCapture": "direct-nodejs", "$schema": "http://json-schema.org/draft-07/schema", "title": "Schema for Webpack Dev Server", "description": "Serves an Angular application using [webpack](https://webpack.js.org/) when the build target is using a webpack-based executor, or [Vite](https://vite.dev/) when the build target uses an [esbuild](https://esbuild.github.io/)-based executor.", "examplesFile": "../../../docs/dev-server-examples.md", "type": "object", "presets": [ { "name": "Using a Different Port", "keys": ["buildTarget", "port"] } ], "properties": { "buildTarget": { "type": "string", "description": "A build builder target to serve in the format of `project:target[:configuration]`.", "pattern": "^[^:\\s]+:[^:\\s]+(:[^\\s]+)?$" }, "port": { "type": "number", "description": "Port to listen on.", "default": 4200 }, "host": { "type": "string", "description": "Host to listen on.", "default": "localhost" }, "proxyConfig": { "type": "string", "description": "Proxy configuration file. For more information, see https://angular.dev/tools/cli/serve#proxying-to-a-backend-server." }, "ssl": { "type": "boolean", "description": "Serve using HTTPS.", "default": false }, "sslKey": { "type": "string", "description": "SSL key to use for serving HTTPS." }, "sslCert": { "type": "string", "description": "SSL certificate to use for serving HTTPS." }, "headers": { "type": "object", "description": "Custom HTTP headers to be added to all responses.", "propertyNames": { "pattern": "^[-_A-Za-z0-9]+$" }, "additionalProperties": { "type": "string" } }, "open": { "type": "boolean", "description": "Opens the url in default browser.", "default": false, "alias": "o" }, "verbose": { "type": "boolean", "description": "Adds more details to output logging." }, "liveReload": { "type": "boolean", "description": "Whether to reload the page on change, using live-reload.", "default": true }, "publicHost": { "type": "string", "description": "The URL that the browser client (or live-reload client, if enabled) should use to connect to the development server. Use for a complex dev server setup, such as one with reverse proxies. This option has no effect when using the 'application' or other esbuild-based builders." }, "allowedHosts": { "type": "array", "description": "List of hosts that are allowed to access the dev server. This option has no effect when using the 'application' or other esbuild-based builders in Angular versions lower than 19.2.0.", "default": [], "items": { "type": "string" } }, "define": { "description": "Defines global identifiers that will be replaced with a specified constant value when found in any JavaScript or TypeScript code including libraries. The value will be used directly. String values must be put in quotes. Identifiers within Angular metadata such as Component Decorators will not be replaced. _Note: this is only supported in Angular versions >= 21.0.0 and it's only applicable for the Vite-based development server._", "type": "object", "additionalProperties": { "type": "string" } }, "servePath": { "type": "string", "description": "The pathname where the app will be served." }, "disableHostCheck": { "type": "boolean", "description": "Don't verify connected clients are part of allowed hosts. This option has no effect when using the 'application' or other esbuild-based builders in Angular versions lower than 19.2.0.", "default": false }, "hmr": { "type": "boolean", "description": "Enable hot module replacement." }, "watch": { "type": "boolean", "description": "Rebuild on change.", "default": true }, "poll": { "type": "number", "description": "Enable and define the file watching poll time period in milliseconds." }, "forceEsbuild": { "type": "boolean", "description": "Force the development server to use the 'browser-esbuild' builder when building. This is a developer preview option for the esbuild-based build system.", "default": false }, "inspect": { "default": false, "description": "Activate debugging inspector. This option only has an effect when 'SSR' or 'SSG' are enabled.", "oneOf": [ { "type": "string", "description": "Activate the inspector on host and port in the format of `[[host:]port]`. See the security warning in https://nodejs.org/docs/latest-v22.x/api/cli.html#warning-binding-inspector-to-a-public-ipport-combination-is-insecure regarding the host parameter usage." }, { "type": "boolean" } ] }, "prebundle": { "description": "Enable and control the Vite-based development server's prebundling capabilities. To enable prebundling, the Angular CLI cache must also be enabled. This option has no effect when using the 'browser' or other Webpack-based builders.", "oneOf": [ { "type": "boolean" }, { "type": "object", "properties": { "exclude": { "description": "List of package imports that should not be prebundled by the development server. The packages will be bundled into the application code itself.", "type": "array", "items": { "type": "string" } } }, "additionalProperties": false, "required": ["exclude"] } ] }, "buildLibsFromSource": { "type": "boolean", "description": "Read buildable libraries from source instead of building them separately. If not set, it will take the value specified in the `buildTarget` options, or it will default to `true` if it's also not set in the `buildTarget` options.", "x-priority": "important" }, "esbuildMiddleware": { "description": "A list of HTTP request middleware functions.", "type": "array", "items": { "type": "string", "description": "The path to the middleware function. Relative to the workspace root." } }, "watchDependencies": { "type": "boolean", "description": "Watch buildable dependencies and rebuild when they change.", "default": true } }, "additionalProperties": false, "required": ["buildTarget"] }