unplugin-vue-cssvars
Version:
🌀 A vue plugin that allows you to use vue's CSSVars feature in css files
47 lines (43 loc) • 1.57 kB
TypeScript
import * as unplugin from 'unplugin';
import * as webpack from 'webpack';
import * as rollup from 'rollup';
import * as vite from 'vite';
import { FilterPattern } from '@rollup/pluginutils';
interface Options {
/**
* Provide path which will be transformed
* @default process.cwd()
*/
rootDir?: string;
/**
* RegExp or glob to match files to be transformed
*/
include?: FilterPattern;
/**
* RegExp or glob to match files to NOT be transformed
*/
exclude?: FilterPattern;
/**
* Specify the file to be compiled, for example,
* if you want to compile scss, then you can pass in ['** /**.sass']
* @property { ['** /**.css', '** /**.less', '** /**.scss', '** /**.sass', '** /**.styl'] }
* @default ['** /**.css']
*/
includeCompile?: Array<string>;
/**
* Flag whether to start with server at development time,
* because unplugin-vue-cssvars uses different strategies for packaging and server development
* @default true
*/
server?: boolean;
/**
* alias
* @default undefined
*/
alias?: Record<string, string>;
}
declare const viteVueCSSVars: (options: Options) => vite.Plugin | vite.Plugin[];
declare const rollupVueCSSVars: (options: Options) => rollup.Plugin | rollup.Plugin[];
declare const webpackVueCSSVars: (options: Options) => webpack.WebpackPluginInstance;
declare const esbuildVueCSSVars: (options: Options) => unplugin.EsbuildPlugin;
export { esbuildVueCSSVars, rollupVueCSSVars, viteVueCSSVars, webpackVueCSSVars };