9b6ea9d466
* WIP * Move data experiment * Do not throw away rules * Remove test code * Correct next data behavior * Add support for async composing * Remove unnecessary workaround * Rename Field
21 lines
470 B
TypeScript
21 lines
470 B
TypeScript
import webpack from 'webpack'
|
|
|
|
export type ConfigurationContext = {
|
|
rootDirectory: string
|
|
customAppFile: string | null
|
|
|
|
isDevelopment: boolean
|
|
isProduction: boolean
|
|
|
|
isServer: boolean
|
|
isClient: boolean
|
|
}
|
|
|
|
export type ConfigurationFn = (
|
|
a: webpack.Configuration
|
|
) => webpack.Configuration
|
|
|
|
export const pipe = <R>(...fns: Array<(a: R) => R | Promise<R>>) => (
|
|
param: R
|
|
) =>
|
|
fns.reduce(async (result: R | Promise<R>, next) => next(await result), param)
|