rollup-plugin-scss
Version:
Rollup multiple .scss, .sass and .css imports
44 lines (43 loc) • 1.18 kB
TypeScript
/// <reference types="node" />
import { CreateFilter } from 'rollup-pluginutils';
import type { Plugin } from 'rollup';
export interface CSSPluginOptions {
exclude?: Parameters<CreateFilter>[1];
failOnError?: boolean;
include?: Parameters<CreateFilter>[0];
includePaths?: string[];
insert?: boolean;
output?: string | false | ((css: string, styles: Styles) => void);
prefix?: string;
processor?: (css: string, map: string, styles: Styles) => CSS | Promise<CSS> | PostCSSProcessor;
sass?: SassRenderer;
sourceMap?: boolean;
verbose?: boolean;
watch?: string | string[];
}
declare type CSS = string | {
css: string;
map: string;
};
interface MappedCSS {
css: string;
map: string;
}
interface Styles {
[id: string]: string;
}
interface PostCSSProcessor {
process: (css: string, options?: any) => MappedCSS;
}
interface SassRenderer {
renderSync: (options: SassOptions) => SassResult;
}
interface SassOptions {
data: string;
}
interface SassResult {
css: Buffer;
map?: Buffer;
}
export default function scss(options?: CSSPluginOptions): Plugin;
export {};