@asi-team/angular-builders-custom-webpack

1.1.6 • Public • Published

Custom webpack builders for Angular build facade with build-in functionality

asi builders use the @angular-builders/custom-webpack with build-in functionality wich can be disable

This documentation is for the latest major version only

Prerequisites:

Usage

See the @angular-builders/custom-webpack doc for basic usage : https://www.npmjs.com/package/@angular-builders/custom-webpack

built-in functionality

version file

Usage

This function generate a single json file on output build directory that contain the following informations :

{"version":,"buildDate":}

These datas are also written at the begining of main generated js entries (main, runtime and polyfile)

/*
 *
 * Build Version : <Version in package.json>
 * Build Date    : <Build datetime>
 *
 */

Configuration

"builder": "@asi-team/angular-builders-custom-webpack:browser",
  "options": {
    "customWebpackConfig": {
      "buildInfos": true // enable/disable the functionality, default true
    }
  }

i18n json merge

Usage

This function allow to merge json i18n files into single output json file per lang

Configuration

"builder": "@asi-team/angular-builders-custom-webpack:browser",
  "options": {
    "customWebpackConfig": {
      "i18nPaths": [       // Source directories relative to project root where pick up recursively <lang>.json files, default ["i18n"]
        "<directory 1>",
        "<directory 2>",
        ...
      ],
      "i18nOutputPath": "<directory>", target directory relative to output dist folder where to write merged <lang>.json files, default "i18n"
      "mergeI18n": true // enable/disable the functionality, default true
    }
  }

Write your own webpack.config.js

You can write your own webpack.config.js (see the base custom webpack builders doc), in this case the plugins are merged to combine these functionality and yours

Readme

Keywords

none

Package Sidebar

Install

npm i @asi-team/angular-builders-custom-webpack

Weekly Downloads

1

Version

1.1.6

License

MIT

Unpacked Size

75 kB

Total Files

35

Last publish

Collaborators

  • asi-dev
  • asi-ngtools
  • xrobert35