refactor(node-swc/types): Provide typed configuration for plugins (#3584)

This commit is contained in:
OJ Kwon 2022-02-16 02:10:05 -08:00 committed by GitHub
parent 2ab99c7404
commit 07485d372e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -492,7 +492,21 @@ export interface JscConfig {
experimental?: {
optimizeHygiene?: boolean,
keepImportAssertions?: boolean
keepImportAssertions?: boolean,
/**
* Specify the location where SWC stores its intermidiate cache files.
* Currently only transform plugin uses this. If not specified, SWC will
* create `.swc` directories.
*/
cacheRoot: string;
/**
* List of custom transform plugins written in WebAssembly.
* First parameter of tuple indicates the name of the plugin - it can be either
* a name of the npm package can be resolved, or absolute path to .wasm binary.
*
* Second parameter of tuple is JSON based configuration for the plugin.
*/
plugins: Array<[string, Record<string, any>]>
},
baseUrl?: string