rsnext/packages/next/build/webpack/config/utils.ts
Joe Haddad 878ee56bb9
Fix New CSS Support Media Paths (#9916)
* Fix CSS Media Paths

* update test

* Use absolute path

* Add new tests

* fix import
2020-01-03 12:45:04 -05:00

23 lines
493 B
TypeScript

import webpack from 'webpack'
export type ConfigurationContext = {
rootDirectory: string
customAppFile: string | null
isDevelopment: boolean
isProduction: boolean
isServer: boolean
isClient: boolean
assetPrefix: string
}
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)