lightningcss-loader
Version:
Speed up your Webpack build with lightningcss
26 lines (25 loc) • 851 B
TypeScript
import type { Compilation } from 'webpack';
import type { SyncHook, SyncBailHook, AsyncSeriesHook, HookMap } from 'tapable';
import type { Source } from 'webpack-sources';
import type { Targets } from 'lightningcss/node/targets';
import { ECacheKey } from './interface';
type StatsPrinter = {
hooks: {
print: HookMap<SyncBailHook<any, string>>;
};
};
type Wp5Compilation = Compilation & {
hooks: Compilation['hooks'] & {
processAssets: AsyncSeriesHook<Record<string, Source>>;
statsPrinter: SyncHook<StatsPrinter>;
};
constructor: {
PROCESS_ASSETS_STAGE_OPTIMIZE_SIZE: 400;
};
};
export declare const isWebpack5: (compilation: Compilation) => compilation is Wp5Compilation;
export declare const getTargets: (opts: {
default?: string | string[];
key: ECacheKey;
}) => Targets;
export {};