-
Notifications
You must be signed in to change notification settings - Fork 24
/
index.d.ts
35 lines (35 loc) · 1.16 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import type { CompileOptions, ModuleCompileOptions, CompileResult } from "svelte/compiler";
import type { PreprocessorGroup } from "svelte/compiler";
import type { Plugin } from "esbuild";
type Warning = CompileResult["warnings"][number];
interface esbuildSvelteOptions {
/**
* Svelte compiler options
*/
compilerOptions?: CompileOptions;
/**
* Svelte compiler options for module files (*.svelte.js and *.svelte.ts)
*/
moduleCompilerOptions?: ModuleCompileOptions;
/**
* The preprocessor(s) to run the Svelte code through before compiling
*/
preprocess?: PreprocessorGroup | PreprocessorGroup[];
/**
* Attempts to cache compiled files if the mtime of the file hasn't changed since last run.
*
*/
cache?: boolean;
/**
* The regex filter to use when filtering files to compile
* Defaults to `/\.svelte$/`
*/
include?: RegExp;
/**
* A function to filter out warnings
* Defaults to a constant function that returns `true`
*/
filterWarnings?: (warning: Warning) => boolean;
}
export default function sveltePlugin(options?: esbuildSvelteOptions): Plugin;
export {};