Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@angular-builders/dev-server

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@angular-builders/dev-server

Dev server generic builder for Angular build facade. Allows to run custom builder in serve target

  • 7.3.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Dev server builders for Angular build facade

npm version npm

Prerequisites:

Builders

Dev server generic

Enhanced @angular-devkit/build-angular:dev-server builder that leverages the custom webpack builder to get webpack configuration.

Unlike the default @angular-devkit/build-angular:dev-server it doesn't use @angular-devkit/build-angular:browser configuration to run the dev server.
Instead it uses a builder that is specified in browserTarget as long as it provides buildWebpackConfig method.

Thus, if you use @angular-builders/dev-server:generic along with @angular-builders/custom-webpack:browser, ng serve will run with custom configuration provided in the latter.

Usage

  1. npm i -D @angular-builders/dev-server
  2. In your angular.json:
    "projects": {
        ...
        "[project]": {
             ...
             "architect": {
                    ...
                    "[architect-target]": {
                              "builder": "@angular-builders/dev-server:generic"
                              "options": {
                                    ...
                              }
    
    Where:
    • [project] is the name of the project to which you want to add the builder
    • [architect-target] is the name of build target you want to run (build, serve, test etc. or any custom target)
  3. If [architect-target] is not one of the predefined targets (like build, serve etc.) then run it like this:
    ng run [project]:[architect-target]
    If it is one of the predefined targets, you can run it by ng [architect-target]

Example

angular.json:

"architect": {
    ...
    "build": {
        "builder": "@angular-builders/custom-webpack:browser"
        "options": {
                     "customWebpackConfig": {
                        path: "./extra-webpack.config.js"
                     }
            ...
        },
    "serve": {
        "builder": "@angular-builders/dev-server:generic",
        "options": {
            "browserTarget": "my-project:build"
        }
    }

In this example dev-server will use custom-webpack:browser builder, hence modified webpack config, when invoking the serve target.

Further reading

Keywords

FAQs

Package last updated on 05 Feb 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc