How to use the @angular-devkit/build-angular/src/angular-cli-files/models/webpack-configs.getOutputHashFormat function in @angular-devkit/build-angular

To help you get started, we’ve selected a few @angular-devkit/build-angular examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github enten / udk / angular / lib / build / ng-devkit.ts View on Github external
if (fileLoader) {
    if (fileLoader.options) {
      (fileLoader.options as { emitFile: boolean }).emitFile = emitFile;
    } else {
      fileLoader.options = { emitFile: emitFile };
    }
  }

  if (emitFile || !webpackConfig.module) {
    return;
  }

  // fix: avoid extract css files when value is false

  // Determine hashing format.
  const hashFormat = getOutputHashFormat(serverOptions.outputHashing as string);

  const autoprefixer = require('autoprefixer');
  const postcssImports = require('postcss-import');

  const udkPostcssPluginCreator = (loader: webpack.loader.LoaderContext) => [
    postcssImports({
      resolve: (url: string) => (url.startsWith('~') ? url.substr(1) : url),
      load: (filename: string) => {
        return new Promise((resolve, reject) => {
          loader.fs.readFile(filename, (err: Error, data: Buffer) => {
            if (err) {
              reject(err);

              return;
            }
github enten / udk / angular / lib / ng-devkit.ts View on Github external
if (fileLoader) {
    if (fileLoader.options) {
      (fileLoader.options as { emitFile: boolean }).emitFile = value;
    } else {
      fileLoader.options = { emitFile: value };
    }
  }

  if (value || !webpackConfig.module) {
    return;
  }

  // fix: avoid extract css files when value is false

  // Determine hashing format.
  const hashFormat = getOutputHashFormat(serverOptions.outputHashing as string);

  const autoprefixer = require('autoprefixer');
  const postcssImports = require('postcss-import');

  const udkPostcssPluginCreator = (loader: webpack.loader.LoaderContext) => [
    postcssImports({
      resolve: (url: string) => (url.startsWith('~') ? url.substr(1) : url),
      load: (filename: string) => {
        return new Promise((resolve, reject) => {
          loader.fs.readFile(filename, (err: Error, data: Buffer) => {
            if (err) {
              reject(err);

              return;
            }

@angular-devkit/build-angular

Angular Webpack Build Facade

MIT
Latest version published 9 days ago

Package Health Score

94 / 100
Full package analysis

Popular @angular-devkit/build-angular functions