diff --git a/crates/node/index.d.ts b/crates/node/index.d.ts index 7164e29c4..fe4f3c8bb 100644 --- a/crates/node/index.d.ts +++ b/crates/node/index.d.ts @@ -33,14 +33,15 @@ export interface BuildParams { alias?: Record; extensions?: string[]; }; - manifest?: boolean; - manifestConfig?: { - fileName: string; - basePath: string; - }; + manifest?: + | false + | { + fileName: string; + basePath: string; + }; mode?: 'development' | 'production'; define?: Record; - devtool?: 'source-map' | 'inline-source-map' | 'none'; + devtool?: false | 'source-map' | 'inline-source-map'; externals?: Record< string, | string @@ -58,29 +59,28 @@ export interface BuildParams { } >; copy?: string[]; - codeSplitting?: 'auto' | 'none'; + codeSplitting?: false | 'auto'; providers?: Record; publicPath?: string; inlineLimit?: number; targets?: Record; platform?: 'node' | 'browser'; - hmr?: boolean; - hmrPort?: string; - hmrHost?: string; - px2rem?: boolean; - px2remConfig?: { - root: number; - propBlackList: string[]; - propWhiteList: string[]; - selectorBlackList: string[]; - selectorWhiteList: string[]; - }; + hmr?: false | { host?: string; port?: number }; + px2rem?: + | false + | { + root?: number; + propBlackList?: string[]; + propWhiteList?: string[]; + selectorBlackList?: string[]; + selectorWhiteList?: string[]; + }; stats?: boolean; hash?: boolean; autoCSSModules?: boolean; ignoreCSSParserErrors?: boolean; dynamicImportToRequire?: boolean; - umd?: string; + umd?: false | string; transformImport?: { libraryName: string; libraryDirectory?: string; @@ -91,29 +91,33 @@ export interface BuildParams { ignores?: string[]; moduleIdStrategy?: 'hashed' | 'named'; minify?: boolean; - _minifish?: { - mapping: Record; - metaPath?: string; - inject?: Record< - string, - | { from: string; exclude?: string; preferRequire?: boolean } - | { - from: string; - named: string; - exclude?: string; - preferRequire?: boolean; - } - | { - from: string; - namespace: true; - exclude?: string; - preferRequire?: boolean; - } - >; - }; - optimization?: { - skipModules?: boolean; - }; + _minifish?: + | false + | { + mapping: Record; + metaPath?: string; + inject?: Record< + string, + | { from: string; exclude?: string; preferRequire?: boolean } + | { + from: string; + named: string; + exclude?: string; + preferRequire?: boolean; + } + | { + from: string; + namespace: true; + exclude?: string; + preferRequire?: boolean; + } + >; + }; + optimization?: + | false + | { + skipModules?: boolean; + }; }; hooks: JsHooks; watch: boolean;