How to use the @angular-devkit/build-webpack.runWebpack function in @angular-devkit/build-webpack

To help you get started, we’ve selected a few @angular-devkit/build-webpack 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 ng-qt / ng-qt / packages / devkit / src / builders / build / index.ts View on Github external
concatMap(config =>
        // @ts-ignore
        runWebpack(config, context, {
          logging: stats => {
            context.logger.info(stats.toString(config.stats));
          },
        }),
      ),
github ng-qt / ng-qt / packages / builders / lib / build / index.js View on Github external
operators_1.concatMap(config =>
      // @ts-ignore
      build_webpack_1.runWebpack(config, context, {
        logging: stats => {
          context.logger.info(stats.toString(config.stats));
        },
      }),
    ),
github nrwl / nx / packages / web / src / utils / third-party / browser / index.ts View on Github external
(lastResult, config) => {
            // Make sure to only run the 2nd build step, if 1st one succeeded
            if (lastResult.success) {
              return runWebpack(config, context, {
                logging:
                  transforms.logging ||
                  (useBundleDownleveling
                    ? () => {}
                    : createBrowserLoggingCallback(
                        !!options.verbose,
                        context.logger
                      ))
              });
            } else {
              return of();
            }
          },
          { success: true } as BuildResult,
github angular / angular-cli / packages / angular_devkit / build_angular / src / server / index.ts View on Github external
concatMap(({ config, i18n }) => {
      return runWebpack(config, context, {
        webpackFactory: require('webpack') as typeof webpack,
      }).pipe(
        concatMap(async output => {
          const { emittedFiles = [], webpackStats } = output;
          if (!output.success || !i18n.shouldInline) {
            return output;
          }

          if (!webpackStats) {
            throw new Error('Webpack stats build result is required.');
          }

          outputPaths = ensureOutputPaths(baseOutputPath, i18n);

          const success = await i18nInlineEmittedFiles(
            context,
github nrwl / nx / packages / node / src / builders / build / build.impl.ts View on Github external
concatMap(config =>
      runWebpack(config, context, {
        logging: stats => {
          context.logger.info(stats.toString(config.stats));
        }
      })
    ),
github bennymeg / nx-electron / src / builders / build / build.impl.ts View on Github external
concatMap(config =>
      runWebpack(config, context, {
        logging: stats => {
          context.logger.info(stats.toString(config.stats));
        }
      })
    ),
github angular / angular-cli / packages / angular_devkit / build_angular / src / extract-i18n / index.ts View on Github external
],
  );

  const logging: WebpackLoggingCallback = (stats, config) => {
    const json = stats.toJson({ errors: true, warnings: true });

    if (stats.hasWarnings()) {
      context.logger.warn(statsWarningsToString(json, config.stats));
    }

    if (stats.hasErrors()) {
      context.logger.error(statsErrorsToString(json, config.stats));
    }
  };

  return runWebpack(config, context, {
    logging,
    webpackFactory: await import('webpack'),
  }).toPromise();
}
github nrwl / nx / packages / web / src / builders / build / build.impl.ts View on Github external
(acc, config) => {
              if (acc.success) {
                return runWebpack(config, context, {
                  logging: stats => {
                    context.logger.info(stats.toString(config.stats));
                  }
                });
              } else {
                return of();
              }
            },
            { success: true } as BuildResult,