Home Reference Source
public class | source

WebpackBaseConfiguration

Extends:

ConfigurationFile → WebpackBaseConfiguration

The base configuration is at the top of the Webpack configurations level and it includes the settings for resolve and module.

Constructor Summary

Public Constructor
public

constructor(events: Events, packageInfo: Object, pathUtils: PathUtils, webpackPluginInfo: WebpackPluginInfo, webpackRulesConfiguration: WebpackRulesConfiguration)

Class constructor.

Member Summary

Public Members
public

A local reference for the events service.

public

The information of the package.json.

public

A local reference for the plugin information.

public

A local reference for the webpackRulesConfiguration service.

Method Summary

Public Methods
public

Create the configuration with the resolve and the module rules.

Inherited Summary

From class ConfigurationFile
public

Whether the configuration should be created every time getConfig gets called or not.

public

A list of paths that can overwrite the configuration.

public

A parent configuration to extend.

public

A local reference for the pathUtils service.

public abstract

This method will be called the first time getConfig gets called (or every time, depending on the value of the asFactory property) and it should return the configuration contents.

public

This is the public method all other services uses to obtain the configuration.

Public Constructors

public constructor(events: Events, packageInfo: Object, pathUtils: PathUtils, webpackPluginInfo: WebpackPluginInfo, webpackRulesConfiguration: WebpackRulesConfiguration) source

Class constructor.

Override:

ConfigurationFile#constructor

Params:

NameTypeAttributeDescription
events Events

To reduce the configuration.

packageInfo Object

The contents of the package.json, to get the dependencies names and use them as externals.

pathUtils PathUtils

Required by ConfigurationFile in order to build the path to the overwrite file.

webpackPluginInfo WebpackPluginInfo

To get the paths that should be defined as external dependencies.

webpackRulesConfiguration WebpackRulesConfiguration

To get all the configuration rules for the type of files that will be bundled.

Public Members

public events: Events source

A local reference for the events service.

public packageInfo: Object source

The information of the package.json.

public webpackPluginInfo: WebpackPluginInfo source

A local reference for the plugin information.

public webpackRulesConfiguration: WebpackRulesConfiguration source

A local reference for the webpackRulesConfiguration service.

Public Methods

public createConfig(params: WebpackConfigurationParams): object source

Create the configuration with the resolve and the module rules. This method uses the reducer events webpack-base-configuration-for-node or webpack-base-configuration-for-browser, depending on the target type, and webpack-base-configuration'. The events recieve the configuration, the params and expects a configuration on return.

Override:

ConfigurationFile#createConfig

Params:

NameTypeAttributeDescription
params WebpackConfigurationParams

A dictionary generated by the top service building the configuration and that includes things like the target information, its entry settings, output paths, etc.

Return:

object