@vanilla-extract/esbuild-plugin
Advanced tools
Comparing version 2.2.1 to 2.2.2
import { IdentifierOption, CompileOptions } from '@vanilla-extract/integration'; | ||
type Platform = 'browser' | 'node' | 'neutral'; | ||
type Format = 'iife' | 'cjs' | 'esm'; | ||
type Loader = 'base64' | 'binary' | 'copy' | 'css' | 'dataurl' | 'default' | 'empty' | 'file' | 'js' | 'json' | 'jsx' | 'text' | 'ts' | 'tsx'; | ||
type LogLevel = 'verbose' | 'debug' | 'info' | 'warning' | 'error' | 'silent'; | ||
type Charset = 'ascii' | 'utf8'; | ||
type Drop = 'console' | 'debugger'; | ||
type Platform = 'browser' | 'node' | 'neutral' | ||
type Format = 'iife' | 'cjs' | 'esm' | ||
type Loader = 'base64' | 'binary' | 'copy' | 'css' | 'dataurl' | 'default' | 'empty' | 'file' | 'js' | 'json' | 'jsx' | 'text' | 'ts' | 'tsx' | ||
type LogLevel = 'verbose' | 'debug' | 'info' | 'warning' | 'error' | 'silent' | ||
type Charset = 'ascii' | 'utf8' | ||
type Drop = 'console' | 'debugger' | ||
interface CommonOptions { | ||
/** Documentation: https://esbuild.github.io/api/#sourcemap */ | ||
sourcemap?: boolean | 'linked' | 'inline' | 'external' | 'both'; | ||
sourcemap?: boolean | 'linked' | 'inline' | 'external' | 'both' | ||
/** Documentation: https://esbuild.github.io/api/#legal-comments */ | ||
legalComments?: 'none' | 'inline' | 'eof' | 'linked' | 'external'; | ||
legalComments?: 'none' | 'inline' | 'eof' | 'linked' | 'external' | ||
/** Documentation: https://esbuild.github.io/api/#source-root */ | ||
sourceRoot?: string; | ||
sourceRoot?: string | ||
/** Documentation: https://esbuild.github.io/api/#sources-content */ | ||
sourcesContent?: boolean; | ||
sourcesContent?: boolean | ||
/** Documentation: https://esbuild.github.io/api/#format */ | ||
format?: Format; | ||
format?: Format | ||
/** Documentation: https://esbuild.github.io/api/#global-name */ | ||
globalName?: string; | ||
globalName?: string | ||
/** Documentation: https://esbuild.github.io/api/#target */ | ||
target?: string | string[]; | ||
target?: string | string[] | ||
/** Documentation: https://esbuild.github.io/api/#supported */ | ||
supported?: Record<string, boolean>; | ||
supported?: Record<string, boolean> | ||
/** Documentation: https://esbuild.github.io/api/#platform */ | ||
platform?: Platform; | ||
platform?: Platform | ||
/** Documentation: https://esbuild.github.io/api/#mangle-props */ | ||
mangleProps?: RegExp; | ||
mangleProps?: RegExp | ||
/** Documentation: https://esbuild.github.io/api/#mangle-props */ | ||
reserveProps?: RegExp; | ||
reserveProps?: RegExp | ||
/** Documentation: https://esbuild.github.io/api/#mangle-props */ | ||
mangleQuoted?: boolean; | ||
mangleQuoted?: boolean | ||
/** Documentation: https://esbuild.github.io/api/#mangle-props */ | ||
mangleCache?: Record<string, string | false>; | ||
mangleCache?: Record<string, string | false> | ||
/** Documentation: https://esbuild.github.io/api/#drop */ | ||
drop?: Drop[]; | ||
drop?: Drop[] | ||
/** Documentation: https://esbuild.github.io/api/#minify */ | ||
minify?: boolean; | ||
minify?: boolean | ||
/** Documentation: https://esbuild.github.io/api/#minify */ | ||
minifyWhitespace?: boolean; | ||
minifyWhitespace?: boolean | ||
/** Documentation: https://esbuild.github.io/api/#minify */ | ||
minifyIdentifiers?: boolean; | ||
minifyIdentifiers?: boolean | ||
/** Documentation: https://esbuild.github.io/api/#minify */ | ||
minifySyntax?: boolean; | ||
minifySyntax?: boolean | ||
/** Documentation: https://esbuild.github.io/api/#charset */ | ||
charset?: Charset; | ||
charset?: Charset | ||
/** Documentation: https://esbuild.github.io/api/#tree-shaking */ | ||
treeShaking?: boolean; | ||
treeShaking?: boolean | ||
/** Documentation: https://esbuild.github.io/api/#ignore-annotations */ | ||
ignoreAnnotations?: boolean; | ||
ignoreAnnotations?: boolean | ||
/** Documentation: https://esbuild.github.io/api/#jsx */ | ||
jsx?: 'transform' | 'preserve' | 'automatic'; | ||
jsx?: 'transform' | 'preserve' | 'automatic' | ||
/** Documentation: https://esbuild.github.io/api/#jsx-factory */ | ||
jsxFactory?: string; | ||
jsxFactory?: string | ||
/** Documentation: https://esbuild.github.io/api/#jsx-fragment */ | ||
jsxFragment?: string; | ||
jsxFragment?: string | ||
/** Documentation: https://esbuild.github.io/api/#jsx-import-source */ | ||
jsxImportSource?: string; | ||
jsxImportSource?: string | ||
/** Documentation: https://esbuild.github.io/api/#jsx-development */ | ||
jsxDev?: boolean; | ||
jsxDev?: boolean | ||
/** Documentation: https://esbuild.github.io/api/#jsx-side-effects */ | ||
jsxSideEffects?: boolean; | ||
jsxSideEffects?: boolean | ||
/** Documentation: https://esbuild.github.io/api/#define */ | ||
define?: { [key: string]: string }; | ||
define?: { [key: string]: string } | ||
/** Documentation: https://esbuild.github.io/api/#pure */ | ||
pure?: string[]; | ||
pure?: string[] | ||
/** Documentation: https://esbuild.github.io/api/#keep-names */ | ||
keepNames?: boolean; | ||
keepNames?: boolean | ||
/** Documentation: https://esbuild.github.io/api/#color */ | ||
color?: boolean; | ||
color?: boolean | ||
/** Documentation: https://esbuild.github.io/api/#log-level */ | ||
logLevel?: LogLevel; | ||
logLevel?: LogLevel | ||
/** Documentation: https://esbuild.github.io/api/#log-limit */ | ||
logLimit?: number; | ||
logLimit?: number | ||
/** Documentation: https://esbuild.github.io/api/#log-override */ | ||
logOverride?: Record<string, LogLevel>; | ||
logOverride?: Record<string, LogLevel> | ||
} | ||
@@ -88,84 +88,76 @@ | ||
/** Documentation: https://esbuild.github.io/api/#bundle */ | ||
bundle?: boolean; | ||
bundle?: boolean | ||
/** Documentation: https://esbuild.github.io/api/#splitting */ | ||
splitting?: boolean; | ||
splitting?: boolean | ||
/** Documentation: https://esbuild.github.io/api/#preserve-symlinks */ | ||
preserveSymlinks?: boolean; | ||
preserveSymlinks?: boolean | ||
/** Documentation: https://esbuild.github.io/api/#outfile */ | ||
outfile?: string; | ||
outfile?: string | ||
/** Documentation: https://esbuild.github.io/api/#metafile */ | ||
metafile?: boolean; | ||
metafile?: boolean | ||
/** Documentation: https://esbuild.github.io/api/#outdir */ | ||
outdir?: string; | ||
outdir?: string | ||
/** Documentation: https://esbuild.github.io/api/#outbase */ | ||
outbase?: string; | ||
outbase?: string | ||
/** Documentation: https://esbuild.github.io/api/#external */ | ||
external?: string[]; | ||
external?: string[] | ||
/** Documentation: https://esbuild.github.io/api/#packages */ | ||
packages?: 'external'; | ||
packages?: 'external' | ||
/** Documentation: https://esbuild.github.io/api/#alias */ | ||
alias?: Record<string, string>; | ||
alias?: Record<string, string> | ||
/** Documentation: https://esbuild.github.io/api/#loader */ | ||
loader?: { [ext: string]: Loader }; | ||
loader?: { [ext: string]: Loader } | ||
/** Documentation: https://esbuild.github.io/api/#resolve-extensions */ | ||
resolveExtensions?: string[]; | ||
resolveExtensions?: string[] | ||
/** Documentation: https://esbuild.github.io/api/#main-fields */ | ||
mainFields?: string[]; | ||
mainFields?: string[] | ||
/** Documentation: https://esbuild.github.io/api/#conditions */ | ||
conditions?: string[]; | ||
conditions?: string[] | ||
/** Documentation: https://esbuild.github.io/api/#write */ | ||
write?: boolean; | ||
write?: boolean | ||
/** Documentation: https://esbuild.github.io/api/#allow-overwrite */ | ||
allowOverwrite?: boolean; | ||
allowOverwrite?: boolean | ||
/** Documentation: https://esbuild.github.io/api/#tsconfig */ | ||
tsconfig?: string; | ||
tsconfig?: string | ||
/** Documentation: https://esbuild.github.io/api/#out-extension */ | ||
outExtension?: { [ext: string]: string }; | ||
outExtension?: { [ext: string]: string } | ||
/** Documentation: https://esbuild.github.io/api/#public-path */ | ||
publicPath?: string; | ||
publicPath?: string | ||
/** Documentation: https://esbuild.github.io/api/#entry-names */ | ||
entryNames?: string; | ||
entryNames?: string | ||
/** Documentation: https://esbuild.github.io/api/#chunk-names */ | ||
chunkNames?: string; | ||
chunkNames?: string | ||
/** Documentation: https://esbuild.github.io/api/#asset-names */ | ||
assetNames?: string; | ||
assetNames?: string | ||
/** Documentation: https://esbuild.github.io/api/#inject */ | ||
inject?: string[]; | ||
inject?: string[] | ||
/** Documentation: https://esbuild.github.io/api/#banner */ | ||
banner?: { [type: string]: string }; | ||
banner?: { [type: string]: string } | ||
/** Documentation: https://esbuild.github.io/api/#footer */ | ||
footer?: { [type: string]: string }; | ||
/** Documentation: https://esbuild.github.io/api/#incremental */ | ||
incremental?: boolean; | ||
footer?: { [type: string]: string } | ||
/** Documentation: https://esbuild.github.io/api/#entry-points */ | ||
entryPoints?: string[] | Record<string, string>; | ||
entryPoints?: string[] | Record<string, string> | { in: string, out: string }[] | ||
/** Documentation: https://esbuild.github.io/api/#stdin */ | ||
stdin?: StdinOptions; | ||
stdin?: StdinOptions | ||
/** Documentation: https://esbuild.github.io/plugins/ */ | ||
plugins?: Plugin[]; | ||
plugins?: Plugin[] | ||
/** Documentation: https://esbuild.github.io/api/#working-directory */ | ||
absWorkingDir?: string; | ||
absWorkingDir?: string | ||
/** Documentation: https://esbuild.github.io/api/#node-paths */ | ||
nodePaths?: string[]; // The "NODE_PATH" variable from Node.js | ||
/** Documentation: https://esbuild.github.io/api/#watch */ | ||
watch?: boolean | WatchMode; | ||
} | ||
interface WatchMode { | ||
onRebuild?: (error: BuildFailure | null, result: BuildResult | null) => void; | ||
} | ||
interface StdinOptions { | ||
contents: string | Uint8Array; | ||
resolveDir?: string; | ||
sourcefile?: string; | ||
loader?: Loader; | ||
contents: string | Uint8Array | ||
resolveDir?: string | ||
sourcefile?: string | ||
loader?: Loader | ||
} | ||
interface Message { | ||
id: string; | ||
pluginName: string; | ||
text: string; | ||
location: Location | null; | ||
notes: Note[]; | ||
id: string | ||
pluginName: string | ||
text: string | ||
location: Location | null | ||
notes: Note[] | ||
@@ -176,75 +168,59 @@ /** | ||
*/ | ||
detail: any; | ||
detail: any | ||
} | ||
interface Note { | ||
text: string; | ||
location: Location | null; | ||
text: string | ||
location: Location | null | ||
} | ||
interface Location { | ||
file: string; | ||
namespace: string; | ||
file: string | ||
namespace: string | ||
/** 1-based */ | ||
line: number; | ||
line: number | ||
/** 0-based, in bytes */ | ||
column: number; | ||
column: number | ||
/** in bytes */ | ||
length: number; | ||
lineText: string; | ||
suggestion: string; | ||
length: number | ||
lineText: string | ||
suggestion: string | ||
} | ||
interface OutputFile { | ||
path: string; | ||
path: string | ||
/** "text" as bytes */ | ||
contents: Uint8Array; | ||
contents: Uint8Array | ||
/** "contents" as text (changes automatically with "contents") */ | ||
readonly text: string; | ||
readonly text: string | ||
} | ||
interface BuildInvalidate { | ||
(): Promise<BuildIncremental>; | ||
dispose(): void; | ||
} | ||
interface BuildIncremental extends BuildResult { | ||
rebuild: BuildInvalidate; | ||
} | ||
interface BuildResult { | ||
errors: Message[]; | ||
warnings: Message[]; | ||
interface BuildResult<SpecificOptions extends BuildOptions = BuildOptions> { | ||
errors: Message[] | ||
warnings: Message[] | ||
/** Only when "write: false" */ | ||
outputFiles?: OutputFile[]; | ||
/** Only when "incremental: true" */ | ||
rebuild?: BuildInvalidate; | ||
/** Only when "watch: true" */ | ||
stop?: () => void; | ||
outputFiles: OutputFile[] | (SpecificOptions['write'] extends false ? never : undefined) | ||
/** Only when "metafile: true" */ | ||
metafile?: Metafile; | ||
metafile: Metafile | (SpecificOptions['metafile'] extends true ? never : undefined) | ||
/** Only when "mangleCache" is present */ | ||
mangleCache?: Record<string, string | false>; | ||
mangleCache: Record<string, string | false> | (SpecificOptions['mangleCache'] extends Object ? never : undefined) | ||
} | ||
interface BuildFailure extends Error { | ||
errors: Message[]; | ||
warnings: Message[]; | ||
} | ||
/** Documentation: https://esbuild.github.io/api/#serve-arguments */ | ||
interface ServeOptions { | ||
port?: number; | ||
host?: string; | ||
servedir?: string; | ||
onRequest?: (args: ServeOnRequestArgs) => void; | ||
port?: number | ||
host?: string | ||
servedir?: string | ||
keyfile?: string | ||
certfile?: string | ||
onRequest?: (args: ServeOnRequestArgs) => void | ||
} | ||
interface ServeOnRequestArgs { | ||
remoteAddress: string; | ||
method: string; | ||
path: string; | ||
status: number; | ||
remoteAddress: string | ||
method: string | ||
path: string | ||
status: number | ||
/** The time to generate the response, not to send it */ | ||
timeInMS: number; | ||
timeInMS: number | ||
} | ||
@@ -254,6 +230,4 @@ | ||
interface ServeResult { | ||
port: number; | ||
host: string; | ||
wait: Promise<void>; | ||
stop: () => void; | ||
port: number | ||
host: string | ||
} | ||
@@ -274,41 +248,54 @@ | ||
}, | ||
}; | ||
} | ||
sourcefile?: string; | ||
loader?: Loader; | ||
banner?: string; | ||
footer?: string; | ||
sourcefile?: string | ||
loader?: Loader | ||
banner?: string | ||
footer?: string | ||
} | ||
interface TransformResult { | ||
code: string; | ||
map: string; | ||
warnings: Message[]; | ||
interface TransformResult<SpecificOptions extends TransformOptions = TransformOptions> { | ||
code: string | ||
map: string | ||
warnings: Message[] | ||
/** Only when "mangleCache" is present */ | ||
mangleCache?: Record<string, string | false>; | ||
mangleCache: Record<string, string | false> | (SpecificOptions['mangleCache'] extends Object ? never : undefined) | ||
/** Only when "legalComments" is "external" */ | ||
legalComments?: string; | ||
legalComments: string | (SpecificOptions['legalComments'] extends 'external' ? never : undefined) | ||
} | ||
interface Plugin { | ||
name: string; | ||
setup: (build: PluginBuild) => (void | Promise<void>); | ||
name: string | ||
setup: (build: PluginBuild) => (void | Promise<void>) | ||
} | ||
interface PluginBuild { | ||
initialOptions: BuildOptions; | ||
resolve(path: string, options?: ResolveOptions): Promise<ResolveResult>; | ||
/** Documentation: https://esbuild.github.io/plugins/#build-options */ | ||
initialOptions: BuildOptions | ||
/** Documentation: https://esbuild.github.io/plugins/#resolve */ | ||
resolve(path: string, options?: ResolveOptions): Promise<ResolveResult> | ||
/** Documentation: https://esbuild.github.io/plugins/#on-start */ | ||
onStart(callback: () => | ||
(OnStartResult | null | void | Promise<OnStartResult | null | void>)): void; | ||
(OnStartResult | null | void | Promise<OnStartResult | null | void>)): void | ||
/** Documentation: https://esbuild.github.io/plugins/#on-end */ | ||
onEnd(callback: (result: BuildResult) => | ||
(void | Promise<void>)): void; | ||
(OnEndResult | null | void | Promise<OnEndResult | null | void>)): void | ||
/** Documentation: https://esbuild.github.io/plugins/#on-resolve */ | ||
onResolve(options: OnResolveOptions, callback: (args: OnResolveArgs) => | ||
(OnResolveResult | null | undefined | Promise<OnResolveResult | null | undefined>)): void; | ||
(OnResolveResult | null | undefined | Promise<OnResolveResult | null | undefined>)): void | ||
/** Documentation: https://esbuild.github.io/plugins/#on-load */ | ||
onLoad(options: OnLoadOptions, callback: (args: OnLoadArgs) => | ||
(OnLoadResult | null | undefined | Promise<OnLoadResult | null | undefined>)): void; | ||
(OnLoadResult | null | undefined | Promise<OnLoadResult | null | undefined>)): void | ||
/** Documentation: https://esbuild.github.io/plugins/#on-dispose */ | ||
onDispose(callback: () => void): void | ||
// This is a full copy of the esbuild library in case you need it | ||
esbuild: { | ||
serve: typeof serve, | ||
context: typeof context, | ||
build: typeof build, | ||
@@ -324,43 +311,52 @@ buildSync: typeof buildSync, | ||
version: typeof version, | ||
}; | ||
} | ||
} | ||
/** Documentation: https://esbuild.github.io/plugins/#resolve-options */ | ||
interface ResolveOptions { | ||
pluginName?: string; | ||
importer?: string; | ||
namespace?: string; | ||
resolveDir?: string; | ||
kind?: ImportKind; | ||
pluginData?: any; | ||
pluginName?: string | ||
importer?: string | ||
namespace?: string | ||
resolveDir?: string | ||
kind?: ImportKind | ||
pluginData?: any | ||
} | ||
/** Documentation: https://esbuild.github.io/plugins/#resolve-results */ | ||
interface ResolveResult { | ||
errors: Message[]; | ||
warnings: Message[]; | ||
errors: Message[] | ||
warnings: Message[] | ||
path: string; | ||
external: boolean; | ||
sideEffects: boolean; | ||
namespace: string; | ||
suffix: string; | ||
pluginData: any; | ||
path: string | ||
external: boolean | ||
sideEffects: boolean | ||
namespace: string | ||
suffix: string | ||
pluginData: any | ||
} | ||
interface OnStartResult { | ||
errors?: PartialMessage[]; | ||
warnings?: PartialMessage[]; | ||
errors?: PartialMessage[] | ||
warnings?: PartialMessage[] | ||
} | ||
interface OnEndResult { | ||
errors?: PartialMessage[] | ||
warnings?: PartialMessage[] | ||
} | ||
/** Documentation: https://esbuild.github.io/plugins/#on-resolve-options */ | ||
interface OnResolveOptions { | ||
filter: RegExp; | ||
namespace?: string; | ||
filter: RegExp | ||
namespace?: string | ||
} | ||
/** Documentation: https://esbuild.github.io/plugins/#on-resolve-arguments */ | ||
interface OnResolveArgs { | ||
path: string; | ||
importer: string; | ||
namespace: string; | ||
resolveDir: string; | ||
kind: ImportKind; | ||
pluginData: any; | ||
path: string | ||
importer: string | ||
namespace: string | ||
resolveDir: string | ||
kind: ImportKind | ||
pluginData: any | ||
} | ||
@@ -381,60 +377,65 @@ | ||
/** Documentation: https://esbuild.github.io/plugins/#on-resolve-results */ | ||
interface OnResolveResult { | ||
pluginName?: string; | ||
pluginName?: string | ||
errors?: PartialMessage[]; | ||
warnings?: PartialMessage[]; | ||
errors?: PartialMessage[] | ||
warnings?: PartialMessage[] | ||
path?: string; | ||
external?: boolean; | ||
sideEffects?: boolean; | ||
namespace?: string; | ||
suffix?: string; | ||
pluginData?: any; | ||
path?: string | ||
external?: boolean | ||
sideEffects?: boolean | ||
namespace?: string | ||
suffix?: string | ||
pluginData?: any | ||
watchFiles?: string[]; | ||
watchDirs?: string[]; | ||
watchFiles?: string[] | ||
watchDirs?: string[] | ||
} | ||
/** Documentation: https://esbuild.github.io/plugins/#on-load-options */ | ||
interface OnLoadOptions { | ||
filter: RegExp; | ||
namespace?: string; | ||
filter: RegExp | ||
namespace?: string | ||
} | ||
/** Documentation: https://esbuild.github.io/plugins/#on-load-arguments */ | ||
interface OnLoadArgs { | ||
path: string; | ||
namespace: string; | ||
suffix: string; | ||
pluginData: any; | ||
path: string | ||
namespace: string | ||
suffix: string | ||
pluginData: any | ||
} | ||
/** Documentation: https://esbuild.github.io/plugins/#on-load-results */ | ||
interface OnLoadResult { | ||
pluginName?: string; | ||
pluginName?: string | ||
errors?: PartialMessage[]; | ||
warnings?: PartialMessage[]; | ||
errors?: PartialMessage[] | ||
warnings?: PartialMessage[] | ||
contents?: string | Uint8Array; | ||
resolveDir?: string; | ||
loader?: Loader; | ||
pluginData?: any; | ||
contents?: string | Uint8Array | ||
resolveDir?: string | ||
loader?: Loader | ||
pluginData?: any | ||
watchFiles?: string[]; | ||
watchDirs?: string[]; | ||
watchFiles?: string[] | ||
watchDirs?: string[] | ||
} | ||
interface PartialMessage { | ||
id?: string; | ||
pluginName?: string; | ||
text?: string; | ||
location?: Partial<Location> | null; | ||
notes?: PartialNote[]; | ||
detail?: any; | ||
id?: string | ||
pluginName?: string | ||
text?: string | ||
location?: Partial<Location> | null | ||
notes?: PartialNote[] | ||
detail?: any | ||
} | ||
interface PartialNote { | ||
text?: string; | ||
location?: Partial<Location> | null; | ||
text?: string | ||
location?: Partial<Location> | null | ||
} | ||
/** Documentation: https://esbuild.github.io/api/#metafile */ | ||
interface Metafile { | ||
@@ -474,12 +475,29 @@ inputs: { | ||
interface FormatMessagesOptions { | ||
kind: 'error' | 'warning'; | ||
color?: boolean; | ||
terminalWidth?: number; | ||
kind: 'error' | 'warning' | ||
color?: boolean | ||
terminalWidth?: number | ||
} | ||
interface AnalyzeMetafileOptions { | ||
color?: boolean; | ||
verbose?: boolean; | ||
color?: boolean | ||
verbose?: boolean | ||
} | ||
interface WatchOptions { | ||
} | ||
interface BuildContext<SpecificOptions extends BuildOptions = BuildOptions> { | ||
/** Documentation: https://esbuild.github.io/api/#rebuild */ | ||
rebuild(): Promise<BuildResult<SpecificOptions>> | ||
/** Documentation: https://esbuild.github.io/api/#watch */ | ||
watch(options?: WatchOptions): Promise<void> | ||
/** Documentation: https://esbuild.github.io/api/#serve */ | ||
serve(options?: ServeOptions): Promise<ServeResult> | ||
cancel(): Promise<void> | ||
dispose(): Promise<void> | ||
} | ||
/** | ||
@@ -493,13 +511,10 @@ * This function invokes the "esbuild" command-line tool for you. It returns a | ||
* | ||
* Documentation: https://esbuild.github.io/api/#build-api | ||
* Documentation: https://esbuild.github.io/api/#build | ||
*/ | ||
declare function build(options: BuildOptions & { write: false }): Promise<BuildResult & { outputFiles: OutputFile[] }>; | ||
declare function build(options: BuildOptions & { incremental: true, metafile: true }): Promise<BuildIncremental & { metafile: Metafile }>; | ||
declare function build(options: BuildOptions & { incremental: true }): Promise<BuildIncremental>; | ||
declare function build(options: BuildOptions & { metafile: true }): Promise<BuildResult & { metafile: Metafile }>; | ||
declare function build(options: BuildOptions): Promise<BuildResult>; | ||
declare function build<SpecificOptions extends BuildOptions>(options: SpecificOptions): Promise<BuildResult<SpecificOptions>> | ||
declare function build(options: BuildOptions): Promise<BuildResult> | ||
/** | ||
* This function is similar to "build" but it serves the resulting files over | ||
* HTTP on a localhost address with the specified port. | ||
* This is the advanced long-running form of "build" that supports additional | ||
* features such as watch mode and a local development server. | ||
* | ||
@@ -509,5 +524,6 @@ * - Works in node: yes | ||
* | ||
* Documentation: https://esbuild.github.io/api/#serve | ||
* Documentation: https://esbuild.github.io/api/#build | ||
*/ | ||
declare function serve(serveOptions: ServeOptions, buildOptions: BuildOptions): Promise<ServeResult>; | ||
declare function context<T extends BuildOptions>(options: T): Promise<BuildContext<T>> | ||
declare function context(options: BuildOptions): Promise<BuildContext> | ||
@@ -523,5 +539,6 @@ /** | ||
* | ||
* Documentation: https://esbuild.github.io/api/#transform-api | ||
* Documentation: https://esbuild.github.io/api/#transform | ||
*/ | ||
declare function transform(input: string | Uint8Array, options?: TransformOptions): Promise<TransformResult>; | ||
declare function transform<SpecificOptions extends TransformOptions>(input: string | Uint8Array, options?: SpecificOptions): Promise<TransformResult<SpecificOptions>> | ||
declare function transform(input: string | Uint8Array, options?: TransformOptions): Promise<TransformResult> | ||
@@ -536,3 +553,3 @@ /** | ||
*/ | ||
declare function formatMessages(messages: PartialMessage[], options: FormatMessagesOptions): Promise<string[]>; | ||
declare function formatMessages(messages: PartialMessage[], options: FormatMessagesOptions): Promise<string[]> | ||
@@ -549,3 +566,3 @@ /** | ||
*/ | ||
declare function analyzeMetafile(metafile: Metafile | string, options?: AnalyzeMetafileOptions): Promise<string>; | ||
declare function analyzeMetafile(metafile: Metafile | string, options?: AnalyzeMetafileOptions): Promise<string> | ||
@@ -558,6 +575,6 @@ /** | ||
* | ||
* Documentation: https://esbuild.github.io/api/#build-api | ||
* Documentation: https://esbuild.github.io/api/#build | ||
*/ | ||
declare function buildSync(options: BuildOptions & { write: false }): BuildResult & { outputFiles: OutputFile[] }; | ||
declare function buildSync(options: BuildOptions): BuildResult; | ||
declare function buildSync<SpecificOptions extends BuildOptions>(options: SpecificOptions): BuildResult<SpecificOptions> | ||
declare function buildSync(options: BuildOptions): BuildResult | ||
@@ -570,5 +587,6 @@ /** | ||
* | ||
* Documentation: https://esbuild.github.io/api/#transform-api | ||
* Documentation: https://esbuild.github.io/api/#transform | ||
*/ | ||
declare function transformSync(input: string, options?: TransformOptions): TransformResult; | ||
declare function transformSync<SpecificOptions extends TransformOptions>(input: string, options?: SpecificOptions): TransformResult<SpecificOptions> | ||
declare function transformSync(input: string | Uint8Array, options?: TransformOptions): TransformResult | ||
@@ -581,3 +599,3 @@ /** | ||
*/ | ||
declare function formatMessagesSync(messages: PartialMessage[], options: FormatMessagesOptions): string[]; | ||
declare function formatMessagesSync(messages: PartialMessage[], options: FormatMessagesOptions): string[] | ||
@@ -592,3 +610,3 @@ /** | ||
*/ | ||
declare function analyzeMetafileSync(metafile: Metafile | string, options?: AnalyzeMetafileOptions): string; | ||
declare function analyzeMetafileSync(metafile: Metafile | string, options?: AnalyzeMetafileOptions): string | ||
@@ -603,5 +621,5 @@ /** | ||
* | ||
* Documentation: https://esbuild.github.io/api/#running-in-the-browser | ||
* Documentation: https://esbuild.github.io/api/#browser | ||
*/ | ||
declare function initialize(options: InitializeOptions): Promise<void>; | ||
declare function initialize(options: InitializeOptions): Promise<void> | ||
@@ -633,3 +651,3 @@ interface InitializeOptions { | ||
declare let version: string; | ||
declare let version: string | ||
@@ -636,0 +654,0 @@ interface VanillaExtractPluginOptions { |
{ | ||
"name": "@vanilla-extract/esbuild-plugin", | ||
"version": "2.2.1", | ||
"version": "2.2.2", | ||
"description": "Zero-runtime Stylesheets-in-TypeScript", | ||
@@ -18,7 +18,7 @@ "main": "dist/vanilla-extract-esbuild-plugin.cjs.js", | ||
"dependencies": { | ||
"@vanilla-extract/integration": "^6.0.2" | ||
"@vanilla-extract/integration": "^6.2.0" | ||
}, | ||
"devDependencies": { | ||
"esbuild": "^0.16.3" | ||
"esbuild": "0.17.6" | ||
} | ||
} |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
34420
865
0