rollup-plugin-jsx-remove-attributes
Version:
rollup & vite plugin to remove jsx attributes
20 lines (19 loc) • 691 B
TypeScript
import type { FilterPattern } from "@rollup/pluginutils";
import type { Plugin } from "vite";
export type ILogger = {
error: typeof console.error;
warn: typeof console.warn;
debug: typeof console.debug;
info: typeof console.info;
};
export interface Options {
attributes?: string[];
include?: FilterPattern;
exclude?: FilterPattern;
usage?: "vite" | "rollup";
environments?: string[];
debug?: boolean;
logger?: ILogger;
}
export type RemoveAttrbutePlugin = typeof VitePluginJSXRemoveAttributes;
export default function VitePluginJSXRemoveAttributes({ include, exclude, attributes, usage, environments, debug, logger, }?: Options): Plugin | false;