1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | import { Builder, BuilderContext, BuilderOutput } from '@angular-devkit/architect';
|
9 | import { json } from '@angular-devkit/core';
|
10 | import { Observable } from 'rxjs';
|
11 | import webpack from 'webpack';
|
12 | import { EmittedFiles } from '../../utils';
|
13 | import { Schema as RealWebpackBuilderSchema } from './schema';
|
14 | export type WebpackBuilderSchema = RealWebpackBuilderSchema;
|
15 | export interface WebpackLoggingCallback {
|
16 | (stats: webpack.Stats, config: webpack.Configuration): void;
|
17 | }
|
18 | export interface WebpackFactory {
|
19 | (config: webpack.Configuration): Observable<webpack.Compiler> | webpack.Compiler;
|
20 | }
|
21 | export type BuildResult = BuilderOutput & {
|
22 | emittedFiles?: EmittedFiles[];
|
23 | webpackStats?: webpack.StatsCompilation;
|
24 | outputPath: string;
|
25 | };
|
26 | export declare function runWebpack(config: webpack.Configuration, context: BuilderContext, options?: {
|
27 | logging?: WebpackLoggingCallback;
|
28 | webpackFactory?: WebpackFactory;
|
29 | shouldProvideStats?: boolean;
|
30 | }): Observable<BuildResult>;
|
31 | declare const builder: Builder<WebpackBuilderSchema & json.JsonObject>;
|
32 | export default builder;
|