New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

angular-builder-custom-terser-options

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-builder-custom-terser-options

Angular builder that allows Terser (Uglify) customization

  • 1.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
42
increased by13.51%
Maintainers
1
Weekly downloads
 
Created
Source

angular-builder-custom-terser-options

Custom Angular builder that allows Terser (Uglify) customization. It's a sub-class of Angular's default builder and it does a very small customization of its logic by extending final webpack config with your custom options for Terser.

PLEASE UPVOTE THIS ISSUE TO BRING TERSER (UGLIFY) CUSTOMIZATION INTO ANGULAR'S DEFAULT BUILDER!!!

Quick start

  1. Install

    npm i -D angular-builder-custom-terser-options
    
  2. Add builders from this package to your angular.json.

    1. Set projects.yourProjectName.architect.build to angular-builder-custom-terser-options:browser-custom-terser
    2. Set projects.yourProjectName.architect.build.configurations.production.optimization to true
    3. Set projects.yourProjectName.architect.build.configurations.production.terserOptions to an object with any minify options supported by Terser. You can find the list of available options here.
    4. Set projects.yourProjectName.architect.serve to angular-builder-custom-terser-options:dev-server-custom-terser
    {
      // ... rest of the default config ,
      "projects": {
        "yourProjectName": {
          "architect": {
            "build": {
              // Set our custom builder here
              "builder": "angular-builder-custom-terser-options:browser-custom-terser",
              "options": {
                // Your default options. Leave it as is
              },
              "configurations": {
                "production": {
                  // Add any options supported by Terser here
                  "terserOptions": {
                    "keep_classnames": true
                  },
                  // Enable optimization to enable Terser itself
                  "optimization": true
                }
              }
            },
            "serve": {
              // Set our custom builder here
              "builder": "angular-builder-custom-terser-options:dev-server-custom-terser"
              // Rest of the config. Leave it as is
            }
          }
        }
      }
    }
    

Keywords

FAQs

Package last updated on 20 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