@wjunt/webpack-config
Version:
Presets of webpack config
27 lines (26 loc) • 896 B
TypeScript
import { Configuration } from 'webpack';
export declare function isDevelopment(): boolean;
/**
* Smartly merge webpack configuration. Basic configuration is merged by default.
* @param configs
* @example
* // Support TypeScript and CSS.
* module.exports = merge({
* css(),
* ts(),
* { ...others },
* });
*/
export declare function merge(...configs: Configuration[]): Configuration;
export declare function checkDependency(name: string): void;
/**
* Return paths to help webpack resolve modules or loaders.
* @param request - Start point to find paths.
* @private
*/
export declare function getResolveModules(request: string): string[];
/**
* This function doesn't really "do anything" at runtime, it's just the identity function for typing.
* @param config
*/
export declare function createWebpackConfiguration<T extends Configuration>(config: T): Configuration & T;