UNPKG

1.1 kBTypeScriptView Raw
1/**
2 * This file is to be watched !
3 * The code must be compatible from @angular-devkit version 6.1.0 to the latest supported
4 *
5 * It uses code block of angular cli to extract parts of webpack configuration
6 */
7import webpack from 'webpack';
8import { workspaces } from '@angular-devkit/core';
9export declare type AngularCliWebpackConfig = {
10 cliCommonWebpackConfig: {
11 plugins: webpack.Plugin[];
12 resolve: {
13 modules: string[];
14 };
15 resolveLoader: webpack.ResolveLoader;
16 };
17 cliStyleWebpackConfig: {
18 entry: string | string[] | webpack.Entry | webpack.EntryFunc;
19 module: {
20 rules: webpack.RuleSetRule[];
21 };
22 plugins: webpack.Plugin[];
23 };
24 tsConfigPath: string;
25};
26/**
27 * Uses angular cli to extract webpack configuration.
28 * The `AngularCliWebpackConfig` type lists the parts used by storybook
29 */
30export declare function extractAngularCliWebpackConfig(dirToSearch: string, project: workspaces.ProjectDefinition, target: workspaces.TargetDefinition, confName?: string): Promise<AngularCliWebpackConfig>;