UNPKG

next-plugin-preval

Version:

> Pre-evaluate async functions (for data fetches) at build time and import them like JSON

23 lines (22 loc) 665 B
interface NextPluginPrevalOptions { } interface WebpackConfig { module?: { rules: any[]; }; [key: string]: any; } interface WebpackOptions { buildId: string; dev: boolean; isServer: boolean; defaultLoaders: object; babel: object; } interface NextConfigValue { webpack?: (config: WebpackConfig, options: WebpackOptions) => WebpackConfig; [key: string]: any; } type NextConfig = NextConfigValue | ((...args: any[]) => NextConfigValue); declare function createNextPluginPreval(_options?: NextPluginPrevalOptions): (_nextConfig?: NextConfig) => (...args: any[]) => NextConfigValue; export default createNextPluginPreval;