import {WebpackBuildEngine} from 'projext-plugin-webpack/src/services/building/engine.js'WebpackBuildEngine
This build engine is in charge of generating the CLI commands and the configuration to bundle a target using Webpack.
Constructor Summary
| Public Constructor | ||
| public |
constructor(environmentUtils: EnvironmentUtils, targets: Targets, webpackConfiguration: WebpackConfiguration, webpackPluginInfo: WebpackPluginInfo) Class constructor. |
|
Member Summary
| Public Members | ||
| public |
A local reference for the |
|
| public |
A local reference for the |
|
| public |
A local reference for the |
|
| public |
A local reference for the plugin information. |
|
Method Summary
| Public Methods | ||
| public |
getBuildCommand(target: Target, buildType: string, forceRun: boolean, forceWatch: boolean, forceInspect: boolean, forceAnalyze: boolean): string Get the CLI build command to bundle a target. |
|
| public |
getConfiguration(target: Target, buildType: string): object Get a webpack configuration for a target. |
|
| public |
Get a Webpack configuration by reading the environment variables sent by the CLI command
|
|
Public Constructors
public constructor(environmentUtils: EnvironmentUtils, targets: Targets, webpackConfiguration: WebpackConfiguration, webpackPluginInfo: WebpackPluginInfo) source
Class constructor.
Params:
| Name | Type | Attribute | Description |
| environmentUtils | EnvironmentUtils | To load environment variables sent by the CLI command to the configuration builder method. |
|
| targets | Targets | To get a target information. |
|
| webpackConfiguration | WebpackConfiguration | To generate a configuration for a target. |
|
| webpackPluginInfo | WebpackPluginInfo | To get the path to the configuration file. |
Public Members
public environmentUtils: EnvironmentUtils source
A local reference for the environmentUtils service.
public webpackConfiguration: WebpackConfiguration source
A local reference for the webpackConfiguration service.
Public Methods
public getBuildCommand(target: Target, buildType: string, forceRun: boolean, forceWatch: boolean, forceInspect: boolean, forceAnalyze: boolean): string source
Get the CLI build command to bundle a target.
Params:
| Name | Type | Attribute | Description |
| target | Target | The target information. |
|
| buildType | string | The intended build type: |
|
| forceRun | boolean |
|
Force the target to run even if the |
| forceWatch | boolean |
|
Force webpack to use the watch mode even if the |
| forceInspect | boolean |
|
Enables the Node inspector even if the target setting
is set to |
| forceAnalyze | boolean |
|
Enables the bundle analyzer. |
