# Config
The config task is used to parse the user-provided configuration (if
available) and generate the webpack config for the client and server
targets. If Structure.paths.config is not null the task tries
to load the configuration file at the resolved path(from the previous task), and
saves its value inside the rc property.
# public Config data
The Config Task implements the IConfig interface, which describes all
exported values. The instance is accessible via quercia.tasks.config.
import { Configuration } from 'webpack'
// the arguments used to call the function exported from the config file
export interface ConfigurationArgument {
config: Configuration
target: Target
mode: 'production' | 'development'
}
// two types for the possible configuration export value
export type Reducer = (data: ConfigurationArgument) => Configuration
export type PReducer = (data: ConfigurationArgument) => Promise<Configuration>
export default interface IConfig {
// the function exported from the `quercia.config.js` file
rc: Reducer | PReducer
// the webpack client and server configurations
client: Configuration
server: Configuration
// hmr is the port on which the HMR server listens on.
// the port is `-1` when we are in build mode or HMR is disabled
hmr: number
}
export type Target = 'client' | 'server' | 'polyfills'