@linaria/vite
Version:
Blazing fast zero-runtime CSS in JS library
19 lines (18 loc) • 830 B
TypeScript
/**
* This file contains a Rollup loader for Linaria.
* It uses the transform.ts function to generate class names from source code,
* returns transformed code without template literals and attaches generated source maps
*/
import type { FilterPattern } from '@rollup/pluginutils';
import type { Plugin } from 'vite';
import type { PluginOptions, Preprocessor } from '@linaria/babel-preset';
import type { IFileReporterOptions } from '@linaria/utils';
type VitePluginOptions = {
debug?: IFileReporterOptions | false | null | undefined;
exclude?: FilterPattern;
include?: FilterPattern;
preprocessor?: Preprocessor;
sourceMap?: boolean;
} & Partial<PluginOptions>;
export { Plugin };
export default function linaria({ debug, include, exclude, sourceMap, preprocessor, ...rest }?: VitePluginOptions): Plugin;