Home Reference Source
public class | source

WebpackBrowserDevelopmentConfiguration

Extends:

ConfigurationFile → WebpackBrowserDevelopmentConfiguration

Creates the specifics of a Webpack configuration for a browser target development build.

Constructor Summary

Public Constructor
public

constructor(appLogger: Logger, events: Events, pathUtils: PathUtils, targetsHTML: TargetsHTML, webpackBaseConfiguration: WebpackBaseConfiguration, webpackPluginInfo: WebpackPluginInfo)

Class constructor.

Member Summary

Public Members
public

A local reference for the appLogger service.

public

A local reference for the events service.

public

A local reference for the targetsHTML service.

public

A local reference for the plugin information.

Method Summary

Public Methods
public

Create the configuration with the entry, the output and the plugins specifics for a browser target development build.

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(appLogger: Logger, events: Events, pathUtils: PathUtils, targetsHTML: TargetsHTML, webpackBaseConfiguration: WebpackBaseConfiguration, webpackPluginInfo: WebpackPluginInfo) source

Class constructor.

Override:

ConfigurationFile#constructor

Params:

NameTypeAttributeDescription
appLogger Logger

To send to the dev server plugin in order to log its events.

events Events

To reduce the configuration.

pathUtils PathUtils

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

targetsHTML TargetsHTML

The service in charge of generating a default HTML file in case the target doesn't have one.

webpackBaseConfiguration WebpackBaseConfiguration

The configuration this one will extend.

webpackPluginInfo WebpackPluginInfo

To get the name of the plugin and use it on the webpack hook that logs the dev server URL when it finishes bundling.

Public Members

public appLogger: Logger source

A local reference for the appLogger service.

public events: Events source

A local reference for the events service.

public targetsHTML: TargetsHTML source

A local reference for the targetsHTML service.

public webpackPluginInfo: WebpackPluginInfo source

A local reference for the plugin information.

Public Methods

public createConfig(params: WebpackConfigurationParams): object source

Create the configuration with the entry, the output and the plugins specifics for a browser target development build. It also checks if it should enable source map and the dev server based on the target information. This method uses the reducer events webpack-browser-development-configuration and webpack-browser-configuration. It sends the configuration, the received 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