npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ng-custom-transformers

v1.0.2

Published

Package adding support for custom TypeScript transformers configured in tsconfig.json with ttypescript format.

Readme

ng-custom-transformers

Because Angular CLI does not support custom TypeScript transformers/plugins (there is still an open feature request, more than 4 years), custom transformers must be configured manually by tampering with the Webpack configuration file.

Compatibility

This package has one peer dependency which is "@ngtools/webpack": ">=12.0.0". Which is generally Angular 12 and higher.

Disclaimer

Since custom TypeScript transformers/plugins are not officially supported by the Angular CLI, this package rely on unexported private features. Currently, it works like a charm, without changing the default behavior, but it may be broken by the future Angular updates so there can be no guarantee.

Usage

  1. Install this package.
    npm i ng-custom-transformers -D
  2. Add your transformer into the tsconfig.json. Format is the same like one defined by ttypescript, but don't use ttypescript, Angular has own pipeline for transformers.
{
    "compilerOptions": {
        // ... your options ...

        // ADD THIS SECTION!
        "plugins": [
            {
                "transform": "tst-reflect-transformer"
            },
            // use transformer you want
        ]
    }
}

Currently, only transform property is supported, which is a transformer package name or path to a transformer. Other options defined by ttypescript are not implemented yet. Feel free to create PR!

  1. let function exported from this package modify Webpack config used by Angular. This can be done by ngx-build-plus or by @angular-builders/custom-webpack, which are packages that allows you to modify Angular's Webpack config. choose one and continue in corresponding section.

@angular-builders/custom-webpack

  1. npm i @angular-builders/custom-webpack -D
  2. Create file mod.webpack.config.js.
const {AngularCustomTransformers} = require("ng-custom-transformers");

module.exports = (config, options, targetOptions) => {
    // Your transformations of "config" ....

    // And the important part here: modifyConfig()
    return AngularCustomTransformers.modifyConfig(config);
};

or .ts

import { AngularCustomTransformers } from "ng-custom-transformers";
import {
    CustomWebpackBrowserSchema,
    TargetOptions
}                                    from "@angular-builders/custom-webpack";
import * as webpack                  from "webpack";

export default function (
    config: webpack.Configuration,
    options: CustomWebpackBrowserSchema,
    targetOptions: TargetOptions
)
{
    // Your transformations of "config"...

    // And the important part here: modifyConfig()
    return AngularCustomTransformers.modifyConfig(config);
}
  1. Modify angular.json.
{
    "architect": {
        // ...
        "build": {
            "builder": "@angular-builders/custom-webpack:browser",
            // use @angular-builders/custom-webpack builder
            "options": {
                "customWebpackConfig": {
                    "path": "./mod.webpack.config.js"
                }
                // ...
            }
        }
    }
}
  1. ng build or ng serve

ngx-build-plus

  1. ng add ngx-build-plus
  2. ng build --plugin ng-custom-transformers or ng serve --plugin ng-custom-transformers