Interface: ImaCliPlugin
Defined in: types.ts:90
Interface for ima/cli plugins that can be defined in plugins field in ima.conf.js. These can be used to extend functionality of default CLI with custom cli arguments and webpack config overrides.
Properties
cliArgs?
readonly
optional
cliArgs:Partial
<Record
<ImaCliCommand
,CommandBuilder
>>
Defined in: types.ts:99
Optional additional CLI arguments to extend the set of existing ones.
name
readonly
name:string
Defined in: types.ts:94
Plugin name, used mainly for better debugging messages.
Methods
postProcess()?
optional
postProcess(args
,imaConfig
):Promise
<void
>
Defined in: types.ts:132
Optional plugin hook to do some custom processing after the compilation has finished. Attention! This hook runs only for build command.
Parameters
args
imaConfig
Returns
Promise
<void
>
prepareConfigurations()?
optional
prepareConfigurations(configurations
,imaConfig
,args
):Promise
<ImaConfigurationContext
[]>
Defined in: types.ts:113
Called right before creating webpack configurations after preProcess call. This hook lets you customize configuration contexts for each webpack config that will be generated. This is usefull when you need to overrite configuration contexts for values that are not editable anywhere else (like output folders).
Parameters
configurations
imaConfig
args
Returns
Promise
<ImaConfigurationContext
[]>
preProcess()?
optional
preProcess(args
,imaConfig
):Promise
<void
>
Defined in: types.ts:105
Optional plugin hook to do some pre processing right after the cli args are processed and the imaConfig is loaded, before the webpack config creation and compiler run.
Parameters
args
imaConfig
Returns
Promise
<void
>
webpack()?
optional
webpack(config
,ctx
,imaConfig
):Promise
<Configuration
>
Defined in: types.ts:122
Webpack callback function used by plugins to customize/extend ima webpack config before it's run.
Parameters
config
Configuration
ctx
imaConfig
Returns
Promise
<Configuration
>