@farmfe/core
Version:
Farm is a extremely fast web build tool written in Rust. Farm can start a project in milliseconds and perform HMR within 10ms, making it much faster than similar tools like webpack and vite.
9 lines (8 loc) • 475 B
TypeScript
/**
* Serve resources that stored in memory. This middleware will be enabled when server.writeToDisk is false.
*/
import { Context, Middleware, Next } from 'koa';
import { Compiler } from '../../compiler/index.js';
import { Server } from '../index.js';
export declare function resourcesMiddleware(compiler: Compiler, serverContext: Server): (ctx: Context, next: Next) => Promise<void>;
export declare function resources(devSeverContext: Server): Middleware | Middleware[];