@arco-plugins/webpack-react
Version:
arco webpack plugin
35 lines (34 loc) • 1.02 kB
TypeScript
import { Compiler } from 'webpack';
import { ArcoDesignPluginOptions } from './interface';
export declare class ThemePlugin {
options: ArcoDesignPluginOptions;
compiler: Compiler;
constructor(options: ArcoDesignPluginOptions);
apply(compiler: any): void;
/**
* 读取主题变量,添加到 less-loader
*/
hookForVariables(): void;
/**
* 读取主题全局样式文件,利用 loader 添加到 style/index.less
*/
hookForGlobalStyle(): void;
/**
* 读取组件的样式文件,附加到各组件的 index.less 和 index.css
*/
hookForComponentStyle(): void;
addAppendLoader(matcher: any, filePath: any, options?: {
importLessPath: boolean;
}): void;
/** 读取组件配置目录 */
getComponentList(): string[];
/**
* 读取主题变量
*/
getThemeVars(): {};
/**
* 将文件内容转为对象
* @param {less file content}} source
*/
transformSourceToObject(source?: string): {};
}