import { Buffer } from "node:buffer";
import { Deprecation as DartSassDeprecation, DeprecationOrId, DeprecationOrId as DartSassDeprecationOrId, DeprecationStatus as DartSassDeprecationStatus, Deprecations as DartSassDeprecations, Logger as Logger$1, LoggerWarnOptions as DartSassLoggerWarnOptions, NodePackageImporter, Version, Version as DartSassVersion } from "@sass/types";
import { Plugin as VitePlugin, ServerOptions as ViteServerOptions } from "vite";
import { OutputOptions as RollupOutputOptions, RollupOptions } from "rollup";
import webpack, { Compilation, Compiler, Configuration, LoaderContext } from "webpack";
import { Config as SWCConfig, Options as SWCOptions } from "@swc/types";
import WebpackChain from "webpack-chain";
import { Configuration as WebpackDevServerConfiguration } from "webpack-dev-server";
import { SectionedSourceMapInput } from "@jridgewell/source-map";
import { Options as Options$1 } from "html-minifier-terser";
import { AsyncSeriesWaterfallHook } from "tapable";
//#region src/utils.d.ts
/**
 * Promise or not
 */
type Awaitable<T> = PromiseLike<T> | T;
/**
 * Any function
 */
type AnyFn<T = unknown> = (...args: T[]) => T;
/**
 * A literal type that supports custom further strings but preserves autocompletion in IDEs.
 *
 * @see https://github.com/microsoft/TypeScript/issues/29729#issuecomment-471566609
 */
type LiteralUnion<Union extends Base, Base = string> = Union | (Base & {
  zz_IGNORE_ME?: never;
});
/**
 * Non empty object `{}`
 */
type NonEmptyObject<T> = T extends Record<string, never> ? never : T;
/**
 * Exclude empty object properties from a type
 */
type ExcludeEmptyObjects<T> = { [K in keyof T]: NonEmptyObject<T[K]>; };
//#endregion
//#region src/config/cache.d.ts
interface CacheBuildDependencies {
  config?: string[];
}
interface Cache {
  /**
   * 是否开启持久化缓存
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#cacheenable
   */
  enable?: boolean;
  /**
   * 缓存子目录的名称
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#cachename
   * @default `process.env.NODE_ENV-process.env.TARO_ENV`
   */
  name?: string;
  /**
   * 当依赖的文件或该文件的依赖改变时，使缓存失效
   *
   * @see https://webpack.js.org/configuration/cache/#cachebuilddependencies
   */
  buildDependencies?: CacheBuildDependencies;
}
//#endregion
//#region src/config/packages/less.d.ts
interface LessSourceMap {
  outputFilename?: string;
  sourceMapRootpath?: string;
  sourceMapBasepath?: string;
  outputSourceFiles?: boolean;
  sourceMapFileInline?: boolean;
  sourceMapURL?: string;
}
interface LessOptions {
  /**
   * Source map options
   */
  sourceMap?: LessSourceMap;
  /**
   * Filename of the main file to be passed to less.render()
   */
  filename?: string;
  /**
   * The locations for less looking for files in @import rules
   */
  paths?: string[];
  /**
   * True, if run the less parser and just reports errors without any output
   */
  lint?: boolean;
  /**
   * Pre-load global Less.js plugins
   */
  plugins?: AnyFn[];
  strictImports?: boolean;
  /**
   * If true, allow imports from insecure https hosts
   */
  insecure?: boolean;
  depends?: boolean;
  maxLineLen?: number;
  /**
   * Add a path to every generated import and url in output css files
   */
  rootpath?: string;
  /**
   * allows you to rewrite URLs in imported files so that the URL is always relative to the base file that has been passed to Less
   *
   * @see https://lesscss.org/usage/#less-options-rewrite-urls
   * @default `off`
   */
  rewriteUrls?: LiteralUnion<'all' | 'local' | 'off'>;
  /**
   * Math mode options for avoiding symbol conflicts on math expressions
   * @description
   *  - `always` (3.x default) - Less does math eagerly
   *  - `parens-division` (4.0 default) - No division is performed outside of parens using / operator (but can be "forced" outside of parens with ./ operator - ./ is deprecated)
   *  - `parens` | `strict` - Parens required for all math expressions
   *  - `strict-legacy` (removed in 4.0) - In some cases, math will not be evaluated if any part of the expression cannot be evaluated
   */
  math?: 'always' | 'parens-division' | 'parens' | 'strict-legacy' | 'strict';
  /**
   * If true, stops any warnings from being shown
   */
  silent?: boolean;
  /**
   * Without this option, Less attempts to guess at the output unit when it does maths
   *
   * @default false
   */
  strictUnits?: boolean;
  /**
   * Defines a variable that can be referenced by the file
   */
  globalVars?: Record<string, string>;
  /**
   * Puts Var declaration at the end of base file
   */
  modifyVars?: Record<string, string>;
  /**
   * This option allows you to specify a argument to go on to every URL, This may be used for cache-busting for instance
   */
  urlArgs?: string;
  /**
   * Read files synchronously in Node.js
   */
  syncImport?: boolean;
  /**
   * If false, No color in compiling
   *
   * @deprecated
   */
  color?: boolean;
  /**
   * @deprecated
   * @default false
   */
  ieCompat?: boolean;
  /**
   * If true, compress using less built-in compression
   *
   * @deprecated use a third-party tool instead
   */
  compress?: boolean;
  /**
   * @deprecated use `math` instead
   */
  strictMath?: boolean;
  /**
   * @deprecated use `{ rewriteUrls: 'all' }` instead
   */
  relativeUrls?: boolean;
  /**
   * Whether output file information and line numbers in compiled CSS code
   *
   * @deprecated
   */
  dumpLineNumbers?: 'all' | 'comments' | 'mediaquery' | string;
  /**
   * If true, enable evaluation of JavaScript inline in `.less` files
   *
   * @deprecated use `plugins` instead
   */
  javascriptEnabled?: boolean;
  [key: string]: any;
}
//#endregion
//#region src/config/packages/sass.d.ts
type CallbackValue = boolean | number | string | (boolean | number | string)[] | Record<PropertyKey, any>;
interface Context {
  options: NodeSassOptions;
  callback?: (result: CallbackValue) => void;
  [data: string]: any;
}
interface AsyncContext extends Context {
  callback: (result: CallbackValue) => void;
}
interface SyncContext extends Context {
  callback: undefined;
}
type ImporterReturnType = Error | {
  contents: string;
  file?: string;
} | {
  file: string;
} | null;
type AsyncImporter = (this: AsyncContext, url: string, prev: string, done: (data: ImporterReturnType) => void) => void;
type SyncImporter = (this: SyncContext, url: string, prev: string) => ImporterReturnType;
/**
 * Taro 配置项中 `sass` 配置
 *
 * @see https://nervjs.github.io/taro-docs/docs/config-detail/#sass
 */
interface TaroSassOptions {
  /**
   * 需要全局注入的 `scss` 文件的绝对路径
   * 当存在 {@link projectDirectory} 配置时，才支持传入相对路径
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#sassresource
   */
  resource?: string | string[];
  /**
   * 项目根目录的绝对地址(若为小程序云开发模板，则应该是 `client` 目录)
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#sassprojectdirectory
   */
  projectDirectory?: string;
  /**
   * 全局 `scss` 变量，优先级高于 `resource`
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#sassdata
   */
  data?: string;
  [key: string]: any;
}
interface CommonSassOptions {
  /**
   * Path to a file to compile
   * @description `unavailable` and will be ignored
   */
  file?: string;
  /**
   * Handles when LibSass encounters the \@import directive
   *
   * @experimental
   */
  importer?: (AsyncImporter | SyncImporter)[] | AsyncImporter | SyncImporter;
  /**
   * holds a collection of custom functions that may be invoked by the sass files being compiled
   *
   * @experimental
   */
  functions?: Record<string, AnyFn>;
  /**
   * `true` values disable the inclusion of source map information in the output file
   *
   * @default false
   */
  omitSourceMapUrl?: boolean;
  /**
   * Enables source map generation during render and renderSync
   */
  sourceMap?: boolean | string;
  /**
   * `true` includes the contents in the source map information
   *
   * @default false
   */
  sourceMapContents?: boolean;
  /**
   * `true` embeds the source map as a data URI
   *
   * @default false
   */
  sourceMapEmbed?: boolean;
  /**
   * the value will be emitted as `sourceRoot` in the source map information
   */
  sourceMapRoot?: string;
}
/**
 * `node-sass` 配置, `sass-loader` 仅支持部分配置
 *
 * @see https://www.npmjs.com/package/@types/node-sass?activeTab=code
 * @compatibility 9.0.0
 * @deprecated
 */
interface NodeSassOptions extends CommonSassOptions {
  /**
   * A string to pass to compile
   * @description `unavailable` and will be ignored
   */
  data?: string;
  /**
   * An array of paths that LibSass can look in to attempt to resolve your \@import declarations
   */
  includePaths?: string[];
  /**
   * true values enable Sass Indented Syntax for parsing the data string or file
   *
   * @default false
   */
  indentedSyntax?: boolean;
  /**
   * Specify the intended location of the output file
   */
  outFile?: string | null;
  /**
   * Determines the output format of the final CSS style
   *
   * @default `nested`
   */
  outputStyle?: LiteralUnion<'compact' | 'compressed' | 'expanded' | 'nested'>;
  /**
   * determine whether to use space or tab character for indentation
   *
   * @default `space`
   */
  indentType?: LiteralUnion<'space' | 'tab'>;
  /**
   * determine the number of spaces or tabs to be used for indentation, max is 10
   *
   * @default 2
   */
  indentWidth?: number;
  /**
   * determine whether to use cr, crlf, lf or lfcr sequence for line break
   *
   * @default `lf`
   */
  linefeed?: LiteralUnion<'cf' | 'crlf' | 'if' | 'lfcr'>;
  /**
   * determine how many digits after the decimal will be allowed
   *
   * @default 5
   */
  precision?: number;
  /**
   * Enables the line number and file where a selector is defined to be emitted into the compiled CSS as a comment
   *
   * @default false
   */
  sourceComments?: boolean;
  [key: string]: any;
}
/**
 * `dart-sass` 配置, `sass-loader` 仅支持部分配置
 *
 * @see https://github.com/sass/dart-sass
 * @see https://www.npmjs.com/package/sass?activeTab=code
 * @compatibility 1.92.1
 */
interface DartSassOptions extends CommonSassOptions {
  /**
   * A string to pass to compile
   * `unavailable` and will be ignored
   */
  data?: never;
  /**
   * Paths in which to look for stylesheets loaded by rules like \@use and \@import.
   */
  loadPaths?: string[];
  /**
   * Specify the intended location of the output file
   */
  outFile?: string;
  /**
   * Determines the output format of the final CSS style
   *
   * @default `expanded`
   * @deprecated use `style` instead
   */
  outputStyle?: LiteralUnion<'compressed' | 'expanded'>;
  /**
   * Determines the output format of the final CSS style
   *
   * @default `expanded`
   */
  style?: LiteralUnion<'compressed' | 'expanded'>;
  /**
   * By default, if the CSS document contains non-ASCII characters, Sass adds a
   * `@charset` declaration (in expanded output mode) or a byte-order mark (in
   * compressed mode) to indicate its encoding to browsers or other consumers.
   * If `charset` is `false`, these annotations are omitted
   *
   * @default true
   */
  charset?: boolean;
  /**
   * If this option is set to `true`, Sass won’t print warnings that are caused
   * by dependencies
   *
   * @default false
   */
  quietDeps?: boolean;
  /**
   * A set of deprecations to treat as fatal
   */
  fatalDeprecations?: (DeprecationOrId | Version)[];
  /**
   * A set of future deprecations to opt into early
   */
  futureDeprecations?: DeprecationOrId[];
  /**
   * A set of active deprecations to ignore
   */
  silenceDeprecations?: DeprecationOrId[];
  /**
   * By default, Dart Sass will print only five instances of the same
   * deprecation warning per compilation to avoid deluging users in console
   * noise. If you set `verbose` to `true`, it will instead print every
   * deprecation warning it encounters
   *
   * @default false
   */
  verbose?: boolean;
  /**
   * An object to use to handle warnings and/or debug messages from Sass
   */
  logger?: Logger$1;
  /**
   * If this option is set to an instance of `NodePackageImporter`, Sass will
   * use the built-in Node.js package importer to resolve Sass files with a
   * `pkg:` URL scheme.
   */
  pkgImporter?: NodePackageImporter;
  /**
   * If this is true, the compiler will exclusively use ASCII characters in its error and warning  * messages. Otherwise, it may use non-ASCII Unicode characters as well.
   *
   * @default false
   */
  alertAscii?: boolean;
  /**
   * If this is true, the compiler will use ANSI color escape codes in its error and warning
   * messages. If it's false, it won't use these. If it's undefined, the compiler will determine
   * whether or not to use colors depending on whether the user is using an interactive terminal.
   *
   * @default false
   */
  alertColor?: boolean;
  /**
   * Whether Sass should include the sources in the generated source map.
   * This option has no effect if sourceMap is false.
   *
   * @default false
   */
  sourceMapIncludeSources?: boolean;
  [key: string]: any;
}
//#endregion
//#region src/config/packages/stylus.d.ts
type StylusOptionsDefineItem = [string, boolean | number | string, boolean?];
interface StylusOptions {
  /**
   * Specify Stylus plugins to use
   */
  use?: (string | AnyFn)[];
  /**
   * Add path(s) to the import lookup paths
   */
  include?: string[];
  /**
   * Import the specified Stylus files/paths
   */
  import?: string[];
  /**
   * Define Stylus variables or functions
   * @default {}
   */
  define?: Record<string, boolean | number | string> | StylusOptionsDefineItem[];
  /**
   * Include regular CSS on \@import
   * @default false
   */
  includeCSS?: boolean;
  /**
   * Emits comments in the generated CSS indicating the corresponding Stylus line
   * @default false
   */
  lineNumbers?: boolean;
  /**
   * Move \@import and \@charset to the top
   * @default false
   */
  hoistAtrules?: boolean;
  [key: string]: any;
}
//#endregion
//#region src/config/packages/cssnano.d.ts
type CSSNanoConfig<T> = T | [T, Record<string, any>] | [T];
interface CSSNanoOptions {
  /**
   * @see https://cssnano.github.io/cssnano/docs/config-file/#choose-a-preset
   */
  preset?: CSSNanoConfig<AnyFn> | CSSNanoConfig<string>;
  /**
   * @see https://cssnano.github.io/cssnano/docs/config-file/#use-individual-plugins
   */
  plugins?: (CSSNanoConfig<AnyFn> | CSSNanoConfig<string>)[] | CSSNanoConfig<AnyFn> | CSSNanoConfig<string>;
  /**
   * @see https://github.com/cssnano/cssnano/blob/master/packages/cssnano/types/index.d.ts
   */
  configFile?: string;
}
//#endregion
//#region src/config/packages/webpack.d.ts
type Webpack = typeof webpack;
type WebpackCompilation = Compilation;
type WebpackCompiler = Compiler;
type WebpackConfiguration = Configuration;
type WebpackLoaderContext<T = any> = LoaderContext<T>;
//#endregion
//#region src/config/packages/css-loader.d.ts
interface CSSLoaderUrl {
  filter: (url: string, resourcePath: string) => boolean;
}
interface CSSLoaderImport {
  filter: (url: string, media: string, resourcePath: string, supports?: string, layer?: string) => boolean;
}
type CSSLoaderModulesUnion = LiteralUnion<'global' | 'icss' | 'local' | 'pure'>;
type CSSLoaderModulesExportLocalsConvention = LiteralUnion<'as-is' | 'asIs' | 'camel-case-only' | 'camel-case' | 'camelCase' | 'camelCaseOnly' | 'dashes-only' | 'dashes' | 'dashesOnly'>;
interface CSSLoaderModulesObject {
  /**
   * @see https://github.com/webpack-contrib/css-loader#auto
   */
  auto?: boolean | RegExp | ((resourcePath: string, resourceQuery: string, resourceFragment: string) => boolean);
  /**
   * @see https://github.com/webpack-contrib/css-loader#mode
   * @default `local`
   */
  mode?: CSSLoaderModulesUnion | ((resourcePath: string, resourceQuery: string, resourceFragment: string) => CSSLoaderModulesUnion);
  /**
   * @see https://github.com/webpack-contrib/css-loader#localidentname
   * @default `hash:base64`
   */
  localIdentName?: string;
  /**
   * @see https://github.com/webpack-contrib/css-loader#localidentcontext
   * @default `compiler.context`
   */
  localIdentContext?: string;
  /**
   * @see https://github.com/webpack-contrib/css-loader#localidenthashsalt
   */
  localIdentHashSalt?: string;
  /**
   * @see https://github.com/webpack-contrib/css-loader#localidenthashfunction
   * @default `md4`
   */
  localIdentHashFunction?: string;
  /**
   * @see https://github.com/webpack-contrib/css-loader#localidenthashdigest
   * @default `hex`
   */
  localIdentHashDigest?: string;
  /**
   * @see https://github.com/webpack-contrib/css-loader#localidenthashdigestlength
   * @default 20
   */
  localIdentHashDigestLength?: number;
  /**
   * @see https://github.com/webpack-contrib/css-loader#localidentregexp
   */
  localIdentRegExp?: string | RegExp;
  /**
   * @see https://github.com/webpack-contrib/css-loader#getlocalident
   */
  getLocalIdent?: (loaderContext: WebpackLoaderContext, localIdentName: string, localName: string) => string;
  /**
   * @see https://github.com/webpack-contrib/css-loader#namedexport
   */
  namedExport?: boolean;
  /**
   * @see https://github.com/webpack-contrib/css-loader#exportglobals
   */
  exportGlobals?: boolean;
  /**
   * @see https://github.com/webpack-contrib/css-loader#exportlocalsconvention
   */
  exportLocalsConvention?: CSSLoaderModulesExportLocalsConvention | ((name: string) => string);
  /**
   * @see https://github.com/webpack-contrib/css-loader#exportonlylocals
   */
  exportOnlyLocals?: boolean;
  /**
   * @see https://github.com/webpack-contrib/css-loader#getjson
   */
  getJSON?: ({ resourcePath, imports, exports, replacements }: {
    resourcePath: string;
    exports: {
      name: string;
      value: string;
    }[];
    imports: {
      icss: boolean;
      importName: string;
      index: number;
      type: string;
      url: string;
    }[];
    replacements: {
      importName: string;
      localName: string;
      replacementName: string;
    }[];
  }) => Awaitable<void>;
}
type CSSLoaderExportType = LiteralUnion<'array' | 'css-style-sheet' | 'string'>;
interface CSSLoaderOptions {
  /**
   * @see https://github.com/webpack-contrib/css-loader#url
   * @default true
   */
  url?: boolean | CSSLoaderUrl;
  /**
   * @see https://github.com/webpack-contrib/css-loader#import
   * @default true
   */
  import?: boolean | CSSLoaderImport;
  /**
   * @see https://github.com/webpack-contrib/css-loader#modules
   */
  modules?: boolean | CSSLoaderModulesObject | CSSLoaderModulesUnion;
  /**
   * @see https://github.com/webpack-contrib/css-loader#sourcemap
   * @default compiler.devtool
   */
  sourceMap?: boolean;
  /**
   * @see https://github.com/webpack-contrib/css-loader#importloaders
   * @default 0
   */
  importLoaders?: number;
  /**
   * @see https://github.com/webpack-contrib/css-loader#esmodule
   * @default true
   */
  esModule?: boolean;
  /**
   * @see https://github.com/webpack-contrib/css-loader#exporttype
   * @default `array`
   */
  exportType?: CSSLoaderExportType;
  [key: string]: any;
}
//#endregion
//#region src/config/packages/url-loader.d.ts
/**
 * `url-loader` 配置
 *
 * @see https://github.com/webpack-contrib/url-loader#options
 * @compatibility 4.1.1
 * @deprecated
 */
interface URLLoaderOptions {
  /**
   * Specify the name of the chunk
   */
  name?: string | ((moduleId: string) => string);
  /**
   * Specifying the maximum size of a file in bytes
   *
   * @see https://github.com/webpack-contrib/url-loader#limit
   * @default true
   */
  limit?: boolean | number | string;
  /**
   * Sets the MIME type for the file to be transformed
   *
   * @see https://github.com/webpack-contrib/url-loader#mimetype
   */
  mimetype?: boolean | string;
  /**
   * Specify the encoding which the file will be inlined with
   *
   * @see https://github.com/webpack-contrib/url-loader#encoding
   * @default `base64`
   */
  encoding?: boolean | string;
  /**
   * You can create you own custom implementation for encoding data.
   *
   * @see https://github.com/webpack-contrib/url-loader#generator
   */
  generator?: (mimetype: string, encoding: string, content: string, resourcePath: string) => string;
  /**
   * Specifies an alternative loader to use when a target file's size exceeds the limit
   *
   * @see https://github.com/webpack-contrib/url-loader#fallback
   * @default `file-loader`
   */
  fallback?: string;
  /**
   * Use ES modules syntax
   *
   * @see https://github.com/webpack-contrib/url-loader#esmodule
   * @default true
   */
  esModule?: boolean;
  [key: string]: any;
}
//#endregion
//#region src/config/packages/less-loader.d.ts
interface LessLoaderOptions {
  /**
   * less options in camelCase, default value is `{ relativeUrls: true }`
   *
   * @see https://github.com/webpack-contrib/less-loader#lessoptions
   */
  lessOptions?: LessOptions | ((loaderConext: WebpackLoaderContext) => LessOptions);
  /**
   * prepends/appends Less code to the actual entry file
   *
   * @see https://github.com/webpack-contrib/less-loader#additionaldata
   */
  additionalData?: LoaderAdditionalData<'less'>;
  /**
   * if generation of source maps
   *
   * @see https://github.com/webpack-contrib/less-loader#sourcemap
   * @default compiler.devtool
   */
  sourceMap?: boolean;
  /**
   * enables/disables the default webpack importer
   *
   * @see https://github.com/webpack-contrib/less-loader#webpackimporter
   * @default true
   */
  webpackImporter?: 'only' | boolean;
  /**
   * determines which implementation of Less to use
   *
   * @see https://github.com/webpack-contrib/less-loader#implementation
   */
  implementation?: string | Record<string, any>;
  /**
   * warnings and errors will be webpack warnings and errors, not just logs
   *
   * @see https://github.com/webpack-contrib/less-loader#lesslogaswarnorerr
   * @default false
   */
  lessLogAsWarnOrErr?: boolean;
  [key: string]: any;
}
//#endregion
//#region src/config/packages/postcss-url.d.ts
type PostCSSUrlUrl = LiteralUnion<'copy' | 'inline' | 'rebase'>;
interface PostCSSUrlUrlAsset {
  url: string;
  pathname?: string;
  absolutePath?: string;
  relativePath?: string;
  search?: string;
  hash?: string;
}
interface PostCSSUrlUrlDir {
  from?: string;
  to?: string;
  file?: string;
}
type PostcssUrlHashOptionsMethod = LiteralUnion<'xxhash32' | 'xxhash64'>;
interface PostcssUrlHashOptions {
  method?: PostcssUrlHashOptionsMethod | ((file: Buffer) => string);
  shrink?: number;
  append?: boolean;
}
interface PostcssUrlOptions {
  /**
   * @see https://github.com/postcss/postcss-url#url
   * @default `rebase`
   */
  url?: PostCSSUrlUrl | ((asset: PostCSSUrlUrlAsset, dir: PostCSSUrlUrlDir) => string);
  /**
   * @see https://github.com/postcss/postcss-url#maxsize
   */
  maxSize?: number;
  /**
   * @see https://github.com/postcss/postcss-url#ignorefragmentwarning
   * @default false
   */
  ignoreFragmentWarning?: boolean;
  /**
   * @default false
   */
  optimizeSvgEncode?: boolean;
  /**
   * @see https://github.com/postcss/postcss-url#filter
   */
  filter?: string | RegExp | ((file: string) => boolean);
  /**
   * @see https://github.com/postcss/postcss-url#includeurifragment
   * @default false
   */
  includeUriFragment?: boolean;
  /**
   * @see https://github.com/postcss/postcss-url#fallback
   */
  fallback?: (asset: PostCSSUrlUrlAsset, dir: PostCSSUrlUrlDir) => string;
  /**
   * @see https://github.com/postcss/postcss-url#basepath
   */
  basePath?: string | string[];
  /**
   * @see https://github.com/postcss/postcss-url#assetspath
   * @default false
   */
  assetsPath?: boolean | string;
  /**
   * @see https://github.com/postcss/postcss-url#usehash
   * @default false
   */
  useHash?: boolean;
  /**
   * @see https://github.com/postcss/postcss-url#hashoptions
   */
  hashOptions?: PostcssUrlHashOptions;
  [key: string]: any;
}
//#endregion
//#region src/config/packages/sass-loader.d.ts
type SassLoaderSassOptions = DartSassOptions | NodeSassOptions;
interface SassLoaderOptions {
  /**
   * determines which implementation of Sass to use
   *
   * @see https://github.com/webpack-contrib/sass-loader#implementation
   * @default `sass`
   */
  implementation?: object | string;
  /**
   * Options for Dart Sass or Node Sass implementation
   *
   * @see https://github.com/webpack-contrib/sass-loader#sassoptions
   */
  sassOptions?: SassLoaderSassOptions | ((content: string | Buffer, loaderContext: WebpackLoaderContext, meta: any) => SassLoaderSassOptions);
  /**
   * Enables/Disables generation of source maps
   *
   * @see https://github.com/webpack-contrib/sass-loader#sourcemap
   * @default compiler.devtool
   */
  sourceMap?: boolean;
  /**
   * Prepends Sass/SCSS code before the actual entry file. In this case, the sass-loader will not override the data option but just prepend the entry's content
   *
   * @see https://github.com/webpack-contrib/sass-loader#additionaldata
   */
  additionalData?: LoaderAdditionalData<'sass'>;
  /**
   * Enables/Disables the default webpack importer
   *
   * @see https://github.com/webpack-contrib/sass-loader#webpackimporter
   * @default true
   */
  webpackImporter?: boolean;
  /**
   * Treats the @warn rule as a webpack warning
   *
   * @see https://github.com/webpack-contrib/sass-loader#warnruleaswarning
   * @default false
   */
  warnRuleAsWarning?: boolean;
  /**
   * Allows you to switch between the legacy and modern APIs
   *
   * @see https://github.com/webpack-contrib/sass-loader#api
   * @see https://sass-lang.com/documentation/js-api/
   * @default `modern` for `sass (dart-sass)` and `sass-embedded`, or `legacy` for `node-sass`
   */
  api?: LiteralUnion<'legacy' | 'modern-compiler' | 'modern'>;
  [key: string]: any;
}
//#endregion
//#region src/config/packages/autoprefixer.d.ts
/**
 * `autoprefixer` 配置
 *
 * @see https://github.com/postcss/autoprefixer/blob/main/lib/autoprefixer.d.ts
 * @compatibility 10.4.23
 */
interface AutoprefixerOptions {
  /**
   * environment for `Browserslist`
   */
  env?: string;
  /**
   * should Autoprefixer use Visual Cascade, if CSS is uncompressed
   *
   * @default true
   */
  cascade?: boolean;
  /**
   * should Autoprefixer add prefixes
   *
   * @default true
   */
  add?: boolean;
  /**
   * should Autoprefixer [remove outdated] prefixes
   *
   * @default true
   */
  remove?: boolean;
  /**
   * should Autoprefixer add prefixes for `@supports` parameters
   *
   * @default true
   */
  supports?: boolean;
  /**
   * should Autoprefixer add prefixes for flexbox properties
   *
   * @default true
   */
  flexbox?: 'no-2009' | boolean;
  /**
   * should Autoprefixer add IE 10-11 prefixes for Grid Layout properties
   * @description
   *  - false (default): prevent Autoprefixer from outputting CSS Grid translations
   *  - "autoplace": enable Autoprefixer grid translations and include autoplacement support. You can also use /* autoprefixer grid: autoplace *\/ in your CSS
   *  - "no-autoplace": enable Autoprefixer grid translations but exclude autoplacement support. You can also use /* autoprefixer grid: no-autoplace *\/ in your CSS. (alias for the deprecated true value)
   *
   * @default false
   */
  grid?: 'autoplace' | 'no-autoplace' | boolean;
  /**
   * custom usage statistics for > 10% in my stats browsers query
   */
  stats?: Record<string, any>;
  /**
   * list of queries for target browsers
   *
   * @description Try to not use it. The best practice is to use `.browserslistrc` config or `browserslist` key in `package.json` to share target browsers with Babel, ESLint and Stylelint
   *
   * @see https://github.com/browserslist/browserslist#queries
   * @default ['defaults']
   */
  overrideBrowserslist?: string | string[];
  /**
   * do not raise error on unknown browser version in `Browserslist` config
   *
   * @default false
   */
  ignoreUnknownVersions?: boolean;
}
//#endregion
//#region src/config/packages/style-loader.d.ts
type StyleLoaderInjectType = LiteralUnion<'autoStyleTag' | 'lazyAutoStyleTag' | 'lazySingletonStyleTag' | 'lazyStyleTag' | 'linkTag' | 'singletonStyleTag' | 'styleTag'>;
interface StyleLoaderOptions {
  /**
   * Allows to setup how styles will be injected into the DOM
   *
   * @see https://github.com/webpack-contrib/style-loader#injecttype
   * @default `styleTag`
   */
  injectType?: StyleLoaderInjectType;
  /**
   * attach given attributes with their values on <style> / <link> element
   *
   * @see https://github.com/webpack-contrib/style-loader#attributes
   */
  attributes?: Record<string, string>;
  /**
   * @see https://github.com/webpack-contrib/style-loader#insert
   * @default `head`
   */
  insert?: string | ((htmlElement: HTMLElement, options: Record<string, any>) => void);
  /**
   * @see https://github.com/webpack-contrib/style-loader#styleTagTransform
   */
  styleTagTransform?: string | ((css: string, styleElement: HTMLStyleElement, options: Record<string, any>) => void);
  /**
   * @see https://github.com/webpack-contrib/style-loader#base
   */
  base?: number;
  /**
   * @see https://github.com/webpack-contrib/style-loader#esmodule
   * @default true
   */
  esModule?: boolean;
  [key: string]: any;
}
//#endregion
//#region src/config/packages/stylus-loader.d.ts
interface StylusOptionsResolveURL {
  paths?: string[];
  nocheck?: boolean;
}
/**
 * @see https://github.com/webpack-contrib/stylus-loader#object
 */
interface StylusLoaderStylusOptions extends StylusOptions {
  resolveURL?: boolean | StylusOptionsResolveURL;
  compress?: boolean;
  paths?: string[];
}
interface StylusLoaderOptions {
  /**
   * @see https://github.com/webpack-contrib/stylus-loader#stylusOptions
   * @default {}
   */
  stylusOptions?: StylusLoaderStylusOptions | ((loaderContext: WebpackLoaderContext) => string[] | {
    paths: string[];
  });
  /**
   * @see https://github.com/webpack-contrib/stylus-loader#sourcemap
   */
  sourceMap?: boolean;
  /**
   * @see https://github.com/webpack-contrib/stylus-loader#webpackimporter
   * @default true
   */
  webpackImporter?: boolean;
  /**
   * @see https://github.com/webpack-contrib/stylus-loader#additionalData
   */
  additionalData?: LoaderAdditionalData<'stylus'>;
  /**
   * @see https://github.com/webpack-contrib/stylus-loader#implementation
   */
  implementation?: string | AnyFn;
  [key: string]: any;
}
//#endregion
//#region src/config/packages/webpack-chain.d.ts
type ChainableWebpackConfig = WebpackChain;
//#endregion
//#region src/config/packages/postcss-css-modules.d.ts
declare class CustomLoader {
  constructor(root: string, plugins: any[]);
  fetch(file: string, relativeTo: string, depTrace: string): Promise<Record<string, string>>;
  finalSource?: string;
}
interface PostcssCssModulesOptions {
  getJSON?: (cssFilename: string, json: Record<string, string>, outputFilename: string) => void;
  /**
   * style of exported classnames, the keys in your json
   */
  localsConvention?: LiteralUnion<'camelCase' | 'camelCaseOnly' | 'dashes' | 'dashesOnly'> | ((originalClassName: string, generatedClassName: string, inputFile: string) => string);
  /**
   * change all the classes are local or global
   *
   * @default `local`
   */
  scopeBehaviour?: LiteralUnion<'global' | 'local'>;
  /**
   *  define paths for global modules
   */
  globalModulePaths?: RegExp[];
  /**
   * 转换模式，取值为 global/module
   */
  namingPattern?: 'global' | string;
  /**
   * generate custom classes
   */
  generateScopedName?: string | ((name: string, filename: string, css: string) => string);
  /**
   * add custom hash to generate more unique classes
   */
  hashPrefix?: string;
  /**
   * export global names via the JSON object along with the local ones
   */
  exportGlobals?: boolean;
  /**
   * root path
   */
  root?: string;
  /**
   * use custom loader if needed
   */
  Loader?: typeof CustomLoader;
  /**
   * resolve custom path alias
   */
  resolve?: (file: string, importer: string) => string | Promise<string | null> | null;
  [key: string]: any;
}
//#endregion
//#region src/config/design.d.ts
interface DesignWidthInput {
  /**
   * 样式文件内容
   */
  css: string;
  /**
   * 样式文件路径
   */
  file?: string;
  hasBOM: boolean;
}
/**
 * @param input - 样式文件绝对路径
 *
 * @returns 设计稿尺寸
 */
type DesignWidth = number | ((input?: number | string | DesignWidthInput) => number);
/**
 * 设计稿尺寸换算规则
 */
type DesignRatio = Record<number | string, number>;
//#endregion
//#region src/config/packages/postcss-pxtransform.d.ts
interface PostcssPxtransformOptions {
  /**
   * 目标平台
   *
   * @default `weapp`
   */
  platform?: LiteralUnion<'h5' | 'harmony' | 'quickapp' | 'rn' | 'weapp'>;
  /**
   * 设计稿尺寸
   *
   * @default 750
   */
  designWidth?: DesignWidth;
  /**
   * 设计稿尺寸换算规则
   */
  deviceRatio?: DesignRatio;
  /**
   * @default 16
   */
  rootValue?: number;
  /**
   * @deprecated use `rootValue` instead
   */
  root_value?: number;
  /**
   * `rem` 单位允许的小数位
   *
   * @default 5
   */
  unitPrecision?: number;
  /**
   * @deprecated use `unitPrecision` instead
   */
  unit_precision?: number;
  /**
   * 允许转换的属性列表
   *
   * @default ['*']
   */
  propList?: string[];
  /**
   * @deprecated use `propList` instead
   */
  prop_white_list?: string[];
  /**
   * @deprecated use `propList` instead
   */
  propWhiteList?: string[];
  /**
   * 黑名单里的选择器将会被忽略
   *
   * @default []
   */
  selectorBlackList?: (string | RegExp)[];
  /**
   * @deprecated use `selectorBlackList` instead
   */
  selector_black_list?: (string | RegExp)[];
  /**
   * 直接替换而不是追加一条进行覆盖
   *
   * @default true
   */
  replace?: boolean;
  /**
   * 允许媒体查询里的 px 单位转换
   *
   * @default false
   */
  mediaQuery?: boolean;
  /**
   * @deprecated use `mediaQuery` instead
   */
  media_query?: boolean;
  /**
   * 设置一个可被转换的最小 px 值
   *
   * @default 0
   */
  minPixelValue?: number;
  /**
   * H5 字体尺寸大小基准值，开发者可以自行调整单位换算的基准值
   *
   * @description supported h5 only
   * @default 20
   */
  baseFontSize?: number;
  /**
   * H5 根节点 font-size 的最小值
   *
   * @description supported h5 only
   * @default 20
   */
  minRootSize?: number;
  /**
   * H5 根节点 font-size 的最大值
   *
   * @description supported h5 only
   * @default 40
   */
  maxRootSize?: number;
  /**
   * 设置 1px 是否需要被转换
   *
   * @default false
   */
  onePxTransform?: boolean;
  /**
   * 转换后的单位，当前仅支持小程序 (默认 `rpx`) 和 Web 端 (默认 `rem`)
   * @description Web 端使用 rem 单位时会注入脚本用于设置 body 上的 font-size 属性，其他单位无该操作
   */
  targetUnit?: LiteralUnion<'rem' | 'rpx' | 'vw'>;
  /**
   * 启用的能力 Scope
   *
   * @default ['platform', 'size']
   */
  methods?: string[];
  /**
   * filter 回调函数，可 exclude 不处理的文件
   */
  exclude?: (fileName: string) => boolean;
  [key: string]: any;
}
//#endregion
//#region src/config/packages/postcss-html-transform.d.ts
type PostcssHtmlTransformPlatform = LiteralUnion<'h5' | 'mini-program' | 'quickapp' | 'rn'>;
interface PostcssHtmlTransformOptions {
  /**
   * 目标构建平台
   *
   * @see https://github.com/NervJS/taro/blob/884c799553df1682ef0996c59c7fbd77f60755c9/packages/postcss-html-transform/src/index.ts#L12
   * @default `mini-program`
   */
  platform?: PostcssHtmlTransformPlatform;
  /**
   * 是否移除鼠标样式, `h5` 平台默认为 `true`
   *
   * @see https://github.com/NervJS/taro/blob/884c799553df1682ef0996c59c7fbd77f60755c9/packages/postcss-html-transform/src/index.ts#L46
   */
  removeCursorStyle?: boolean;
  [key: string]: any;
}
//#endregion
//#region src/config/packages/mini-css-extract-plugin.d.ts
interface MiniCSSExtractPluginOptions {
  /**
   * determines the name of each output CSS file
   *
   * @see https://github.com/webpack-contrib/mini-css-extract-plugin#filename
   */
  filename?: Required<WebpackConfiguration>['output']['filename'];
  /**
   * determines the name of non-entry chunk files
   *
   * @see https://github.com/webpack-contrib/mini-css-extract-plugin#chunkfilename
   */
  chunkFilename?: Required<WebpackConfiguration>['output']['chunkFilename'];
  /**
   * Remove Order Warnings
   *
   * @see https://github.com/webpack-contrib/mini-css-extract-plugin#ignoreorder
   * @default false
   */
  ignoreOrder?: boolean;
  /**
   * Inserts the link tag at the given position for non-initial (async) CSS chunks
   *
   * @see https://github.com/webpack-contrib/mini-css-extract-plugin#insert
   * @default `document.head.appendChild(linkTag)`
   */
  insert?: string | ((linkTag: HTMLLinkElement) => void);
  /**
   * attach given attributes with their values on <link> element, only for non-initial (async) chunks
   *
   * @see https://github.com/webpack-contrib/mini-css-extract-plugin#attributes
   * @default {}
   */
  attributes?: Record<string, string>;
  /**
   * This option allows loading asynchronous chunks with a custom link type, such as `<link type="text/css" ...>`
   *
   * @see https://github.com/webpack-contrib/mini-css-extract-plugin#linktype
   * @default `text/css`
   */
  linkType?: false | string;
  /**
   * Allows to enable/disable the runtime generation
   * @see https://github.com/webpack-contrib/mini-css-extract-plugin#runtime
   *
   * @default true
   */
  runtime?: boolean;
  /**
   * Use a new webpack API to execute modules instead of child compilers
   * @see https://github.com/webpack-contrib/mini-css-extract-plugin#experimentalUseImportModule
   */
  experimentalUseImportModule?: boolean;
  [key: string]: any;
}
//#endregion
//#region src/config/packages/esbuild.d.ts
/**
 * @file `esbuild` 类型
 *
 * @see https://www.npmjs.com/package/esbuild?activeTab=code
 * @compatibility 0.27.3
 */
type Platform = 'browser' | 'neutral' | 'node';
type Format = 'cjs' | 'esm' | 'iife';
type Loader = 'base64' | 'binary' | 'copy' | 'css' | 'dataurl' | 'default' | 'empty' | 'file' | 'js' | 'json' | 'jsx' | 'local-css' | 'text' | 'ts' | 'tsx';
type LogLevel = 'debug' | 'error' | 'info' | 'silent' | 'verbose' | 'warning';
type Charset = 'ascii' | 'utf8';
type Drop = 'console' | 'debugger';
type AbsPaths = 'code' | 'log' | 'metafile';
interface CommonOptions {
  /** Documentation: https://esbuild.github.io/api/#sourcemap */
  sourcemap?: 'both' | 'external' | 'inline' | 'linked' | boolean;
  /** Documentation: https://esbuild.github.io/api/#legal-comments */
  legalComments?: 'eof' | 'external' | 'inline' | 'linked' | 'none';
  /** Documentation: https://esbuild.github.io/api/#source-root */
  sourceRoot?: string;
  /** Documentation: https://esbuild.github.io/api/#sources-content */
  sourcesContent?: boolean;
  /** Documentation: https://esbuild.github.io/api/#format */
  format?: Format;
  /** Documentation: https://esbuild.github.io/api/#global-name */
  globalName?: string;
  /** Documentation: https://esbuild.github.io/api/#target */
  target?: string | string[];
  /** Documentation: https://esbuild.github.io/api/#supported */
  supported?: Record<string, boolean>;
  /** Documentation: https://esbuild.github.io/api/#platform */
  platform?: Platform;
  /** Documentation: https://esbuild.github.io/api/#mangle-props */
  mangleProps?: RegExp;
  /** Documentation: https://esbuild.github.io/api/#mangle-props */
  reserveProps?: RegExp;
  /** Documentation: https://esbuild.github.io/api/#mangle-props */
  mangleQuoted?: boolean;
  /** Documentation: https://esbuild.github.io/api/#mangle-props */
  mangleCache?: Record<string, false | string>;
  /** Documentation: https://esbuild.github.io/api/#drop */
  drop?: Drop[];
  /** Documentation: https://esbuild.github.io/api/#drop-labels */
  dropLabels?: string[];
  /** Documentation: https://esbuild.github.io/api/#minify */
  minify?: boolean;
  /** Documentation: https://esbuild.github.io/api/#minify */
  minifyWhitespace?: boolean;
  /** Documentation: https://esbuild.github.io/api/#minify */
  minifyIdentifiers?: boolean;
  /** Documentation: https://esbuild.github.io/api/#minify */
  minifySyntax?: boolean;
  /** Documentation: https://esbuild.github.io/api/#line-limit */
  lineLimit?: number;
  /** Documentation: https://esbuild.github.io/api/#charset */
  charset?: Charset;
  /** Documentation: https://esbuild.github.io/api/#tree-shaking */
  treeShaking?: boolean;
  /** Documentation: https://esbuild.github.io/api/#ignore-annotations */
  ignoreAnnotations?: boolean;
  /** Documentation: https://esbuild.github.io/api/#jsx */
  jsx?: 'automatic' | 'preserve' | 'transform';
  /** Documentation: https://esbuild.github.io/api/#jsx-factory */
  jsxFactory?: string;
  /** Documentation: https://esbuild.github.io/api/#jsx-fragment */
  jsxFragment?: string;
  /** Documentation: https://esbuild.github.io/api/#jsx-import-source */
  jsxImportSource?: string;
  /** Documentation: https://esbuild.github.io/api/#jsx-development */
  jsxDev?: boolean;
  /** Documentation: https://esbuild.github.io/api/#jsx-side-effects */
  jsxSideEffects?: boolean;
  /** Documentation: https://esbuild.github.io/api/#define */
  define?: Record<string, string>;
  /** Documentation: https://esbuild.github.io/api/#pure */
  pure?: string[];
  /** Documentation: https://esbuild.github.io/api/#keep-names */
  keepNames?: boolean;
  /** Documentation: https://esbuild.github.io/api/#abs-paths */
  absPaths?: AbsPaths[];
  /** Documentation: https://esbuild.github.io/api/#color */
  color?: boolean;
  /** Documentation: https://esbuild.github.io/api/#log-level */
  logLevel?: LogLevel;
  /** Documentation: https://esbuild.github.io/api/#log-limit */
  logLimit?: number;
  /** Documentation: https://esbuild.github.io/api/#log-override */
  logOverride?: Record<string, LogLevel>;
  /** Documentation: https://esbuild.github.io/api/#tsconfig-raw */
  tsconfigRaw?: string | TsconfigRaw;
}
interface TsconfigRaw {
  compilerOptions?: {
    alwaysStrict?: boolean;
    baseUrl?: string;
    experimentalDecorators?: boolean;
    importsNotUsedAsValues?: 'error' | 'preserve' | 'remove';
    jsx?: 'preserve' | 'react-jsx' | 'react-jsxdev' | 'react-native' | 'react';
    jsxFactory?: string;
    jsxFragmentFactory?: string;
    jsxImportSource?: string;
    paths?: Record<string, string[]>;
    preserveValueImports?: boolean;
    strict?: boolean;
    target?: string;
    useDefineForClassFields?: boolean;
    verbatimModuleSyntax?: boolean;
  };
}
interface BuildOptions extends CommonOptions {
  /** Documentation: https://esbuild.github.io/api/#bundle */
  bundle?: boolean;
  /** Documentation: https://esbuild.github.io/api/#splitting */
  splitting?: boolean;
  /** Documentation: https://esbuild.github.io/api/#preserve-symlinks */
  preserveSymlinks?: boolean;
  /** Documentation: https://esbuild.github.io/api/#outfile */
  outfile?: string;
  /** Documentation: https://esbuild.github.io/api/#metafile */
  metafile?: boolean;
  /** Documentation: https://esbuild.github.io/api/#outdir */
  outdir?: string;
  /** Documentation: https://esbuild.github.io/api/#outbase */
  outbase?: string;
  /** Documentation: https://esbuild.github.io/api/#external */
  external?: string[];
  /** Documentation: https://esbuild.github.io/api/#packages */
  packages?: 'bundle' | 'external';
  /** Documentation: https://esbuild.github.io/api/#alias */
  alias?: Record<string, string>;
  /** Documentation: https://esbuild.github.io/api/#loader */
  loader?: Record<string, Loader>;
  /** Documentation: https://esbuild.github.io/api/#resolve-extensions */
  resolveExtensions?: string[];
  /** Documentation: https://esbuild.github.io/api/#main-fields */
  mainFields?: string[];
  /** Documentation: https://esbuild.github.io/api/#conditions */
  conditions?: string[];
  /** Documentation: https://esbuild.github.io/api/#write */
  write?: boolean;
  /** Documentation: https://esbuild.github.io/api/#allow-overwrite */
  allowOverwrite?: boolean;
  /** Documentation: https://esbuild.github.io/api/#tsconfig */
  tsconfig?: string;
  /** Documentation: https://esbuild.github.io/api/#out-extension */
  outExtension?: Record<string, string>;
  /** Documentation: https://esbuild.github.io/api/#public-path */
  publicPath?: string;
  /** Documentation: https://esbuild.github.io/api/#entry-names */
  entryNames?: string;
  /** Documentation: https://esbuild.github.io/api/#chunk-names */
  chunkNames?: string;
  /** Documentation: https://esbuild.github.io/api/#asset-names */
  assetNames?: string;
  /** Documentation: https://esbuild.github.io/api/#inject */
  inject?: string[];
  /** Documentation: https://esbuild.github.io/api/#banner */
  banner?: Record<string, string>;
  /** Documentation: https://esbuild.github.io/api/#footer */
  footer?: Record<string, string>;
  /** Documentation: https://esbuild.github.io/api/#entry-points */
  entryPoints?: (string | {
    in: string;
    out: string;
  })[] | Record<string, string>;
  /** Documentation: https://esbuild.github.io/api/#stdin */
  stdin?: StdinOptions;
  /** Documentation: https://esbuild.github.io/plugins/ */
  plugins?: Plugin$1[];
  /** Documentation: https://esbuild.github.io/api/#working-directory */
  absWorkingDir?: string;
  /** Documentation: https://esbuild.github.io/api/#node-paths */
  nodePaths?: string[];
}
interface StdinOptions {
  contents: string | Uint8Array;
  resolveDir?: string;
  sourcefile?: string;
  loader?: Loader;
}
interface Message {
  id: string;
  pluginName: string;
  text: string;
  location: Location | null;
  notes: Note[];
  /**
   * Optional user-specified data that is passed through unmodified. You can
   * use this to stash the original error, for example.
   */
  detail: any;
}
interface Note {
  text: string;
  location: Location | null;
}
interface Location {
  file: string;
  namespace: string;
  /** 1-based */
  line: number;
  /** 0-based, in bytes */
  column: number;
  /** in bytes */
  length: number;
  lineText: string;
  suggestion: string;
}
interface OutputFile {
  path: string;
  contents: Uint8Array;
  hash: string;
  /** "contents" as text (changes automatically with "contents") */
  readonly text: string;
}
interface BuildResult<ProvidedOptions extends BuildOptions = BuildOptions> {
  errors: Message[];
  warnings: Message[];
  /** Only when "write: false" */
  outputFiles: OutputFile[] | (ProvidedOptions['write'] extends false ? never : undefined);
  /** Only when "metafile: true" */
  metafile: Metafile | (ProvidedOptions['metafile'] extends true ? never : undefined);
  /** Only when "mangleCache" is present */
  mangleCache: Record<string, false | string> | (ProvidedOptions['mangleCache'] extends object ? never : undefined);
}
/** Documentation: https://esbuild.github.io/api/#serve-arguments */
interface ServeOptions {
  port?: number;
  host?: string;
  servedir?: string;
  keyfile?: string;
  certfile?: string;
  fallback?: string;
  cors?: CORSOptions;
  onRequest?: (args: ServeOnRequestArgs) => void;
}
/** Documentation: https://esbuild.github.io/api/#cors */
interface CORSOptions {
  origin?: string | string[];
}
interface ServeOnRequestArgs {
  remoteAddress: string;
  method: string;
  path: string;
  status: number;
  /** The time to generate the response, not to send it */
  timeInMS: number;
}
/** Documentation: https://esbuild.github.io/api/#serve-return-values */
interface ServeResult {
  port: number;
  hosts: string[];
}
interface TransformOptions extends CommonOptions {
  /** Documentation: https://esbuild.github.io/api/#sourcefile */
  sourcefile?: string;
  /** Documentation: https://esbuild.github.io/api/#loader */
  loader?: Loader;
  /** Documentation: https://esbuild.github.io/api/#banner */
  banner?: string;
  /** Documentation: https://esbuild.github.io/api/#footer */
  footer?: string;
}
interface TransformResult<ProvidedOptions extends TransformOptions = TransformOptions> {
  code: string;
  map: string;
  warnings: Message[];
  /** Only when "mangleCache" is present */
  mangleCache: Record<string, false | string> | (ProvidedOptions['mangleCache'] extends object ? never : undefined);
  /** Only when "legalComments" is "external" */
  legalComments: string | (ProvidedOptions['legalComments'] extends 'external' ? never : undefined);
}
interface Plugin$1 {
  name: string;
  setup: (build: PluginBuild) => Promise<void> | void;
}
interface PluginBuild {
  /** 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 | Promise<OnStartResult | null | void> | null | void): void;
  /** Documentation: https://esbuild.github.io/plugins/#on-end */
  onEnd(callback: (result: BuildResult) => OnEndResult | Promise<OnEndResult | null | void> | null | void): void;
  /** Documentation: https://esbuild.github.io/plugins/#on-resolve */
  onResolve(options: OnResolveOptions, callback: (args: OnResolveArgs) => OnResolveResult | Promise<OnResolveResult | null | undefined> | null | undefined): void;
  /** Documentation: https://esbuild.github.io/plugins/#on-load */
  onLoad(options: OnLoadOptions, callback: (args: OnLoadArgs) => OnLoadResult | Promise<OnLoadResult | null | undefined> | null | undefined): void;
  /** Documentation: https://esbuild.github.io/plugins/#on-dispose */
  onDispose(callback: () => void): void;
  esbuild: {
    analyzeMetafile: typeof analyzeMetafile;
    analyzeMetafileSync: typeof analyzeMetafileSync;
    build: typeof build;
    buildSync: typeof buildSync;
    context: typeof context;
    formatMessages: typeof formatMessages;
    formatMessagesSync: typeof formatMessagesSync;
    initialize: typeof initialize;
    transform: typeof transform;
    transformSync: typeof transformSync;
    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;
  with?: Record<string, string>;
}
/** Documentation: https://esbuild.github.io/plugins/#resolve-results */
interface ResolveResult {
  errors: Message[];
  warnings: Message[];
  path: string;
  external: boolean;
  sideEffects: boolean;
  namespace: string;
  suffix: string;
  pluginData: any;
}
interface OnStartResult {
  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;
}
/** Documentation: https://esbuild.github.io/plugins/#on-resolve-arguments */
interface OnResolveArgs {
  path: string;
  importer: string;
  namespace: string;
  resolveDir: string;
  kind: ImportKind;
  pluginData: any;
  with: Record<string, string>;
}
type ImportKind = 'composes-from' | 'dynamic-import' | 'entry-point' | 'import-rule' | 'import-statement' | 'require-call' | 'require-resolve' | 'url-token';
/** Documentation: https://esbuild.github.io/plugins/#on-resolve-results */
interface OnResolveResult {
  pluginName?: string;
  errors?: PartialMessage[];
  warnings?: PartialMessage[];
  path?: string;
  external?: boolean;
  sideEffects?: boolean;
  namespace?: string;
  suffix?: string;
  pluginData?: any;
  watchFiles?: string[];
  watchDirs?: string[];
}
/** Documentation: https://esbuild.github.io/plugins/#on-load-options */
interface OnLoadOptions {
  filter: RegExp;
  namespace?: string;
}
/** Documentation: https://esbuild.github.io/plugins/#on-load-arguments */
interface OnLoadArgs {
  path: string;
  namespace: string;
  suffix: string;
  pluginData: any;
  with: Record<string, string>;
}
/** Documentation: https://esbuild.github.io/plugins/#on-load-results */
interface OnLoadResult {
  pluginName?: string;
  errors?: PartialMessage[];
  warnings?: PartialMessage[];
  contents?: string | Uint8Array;
  resolveDir?: string;
  loader?: Loader;
  pluginData?: any;
  watchFiles?: string[];
  watchDirs?: string[];
}
interface PartialMessage {
  id?: string;
  pluginName?: string;
  text?: string;
  location?: Partial<Location> | null;
  notes?: PartialNote[];
  detail?: any;
}
interface PartialNote {
  text?: string;
  location?: Partial<Location> | null;
}
/** Documentation: https://esbuild.github.io/api/#metafile */
interface Metafile {
  inputs: Record<string, {
    bytes: number;
    format?: 'cjs' | 'esm';
    with?: Record<string, string>;
    imports: {
      kind: ImportKind;
      path: string;
      external?: boolean;
      original?: string;
      with?: Record<string, string>;
    }[];
  }>;
  outputs: Record<string, {
    bytes: number;
    exports: string[];
    cssBundle?: string;
    entryPoint?: string;
    imports: {
      kind: 'file-loader' | ImportKind;
      path: string;
      external?: boolean;
    }[];
    inputs: Record<string, {
      bytesInOutput: number;
    }>;
  }>;
}
interface FormatMessagesOptions {
  kind: 'error' | 'warning';
  color?: boolean;
  terminalWidth?: number;
}
interface AnalyzeMetafileOptions {
  color?: boolean;
  verbose?: boolean;
}
/** Documentation: https://esbuild.github.io/api/#watch-arguments */
interface WatchOptions {
  delay?: number;
}
interface BuildContext<ProvidedOptions extends BuildOptions = BuildOptions> {
  /** Documentation: https://esbuild.github.io/api/#rebuild */
  rebuild(): Promise<BuildResult<ProvidedOptions>>;
  /** 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>;
}
type SameShape<Out, In extends Out> = In & Record<Exclude<keyof In, keyof Out>, never>;
/**
 * This function invokes the "esbuild" command-line tool for you. It returns a
 * promise that either resolves with a "BuildResult" object or rejects with a
 * "BuildFailure" object.
 *
 * - Works in node: yes
 * - Works in browser: yes
 *
 * Documentation: https://esbuild.github.io/api/#build
 */
declare function build<T extends BuildOptions>(options: SameShape<BuildOptions, T>): Promise<BuildResult<T>>;
/**
 * This is the advanced long-running form of "build" that supports additional
 * features such as watch mode and a local development server.
 *
 * - Works in node: yes
 * - Works in browser: no
 *
 * Documentation: https://esbuild.github.io/api/#build
 */
declare function context<T extends BuildOptions>(options: SameShape<BuildOptions, T>): Promise<BuildContext<T>>;
/**
 * This function transforms a single JavaScript file. It can be used to minify
 * JavaScript, convert TypeScript/JSX to JavaScript, or convert newer JavaScript
 * to older JavaScript. It returns a promise that is either resolved with a
 * "TransformResult" object or rejected with a "TransformFailure" object.
 *
 * - Works in node: yes
 * - Works in browser: yes
 *
 * Documentation: https://esbuild.github.io/api/#transform
 */
declare function transform<T extends TransformOptions>(input: string | Uint8Array, options?: SameShape<TransformOptions, T>): Promise<TransformResult<T>>;
/**
 * Converts log messages to formatted message strings suitable for printing in
 * the terminal. This allows you to reuse the built-in behavior of esbuild's
 * log message formatter. This is a batch-oriented API for efficiency.
 *
 * - Works in node: yes
 * - Works in browser: yes
 */
declare function formatMessages(messages: PartialMessage[], options: FormatMessagesOptions): Promise<string[]>;
/**
 * Pretty-prints an analysis of the metafile JSON to a string. This is just for
 * convenience to be able to match esbuild's pretty-printing exactly. If you want
 * to customize it, you can just inspect the data in the metafile yourself.
 *
 * - Works in node: yes
 * - Works in browser: yes
 *
 * Documentation: https://esbuild.github.io/api/#analyze
 */
declare function analyzeMetafile(metafile: string | Metafile, options?: AnalyzeMetafileOptions): Promise<string>;
/**
 * A synchronous version of "build".
 *
 * - Works in node: yes
 * - Works in browser: no
 *
 * Documentation: https://esbuild.github.io/api/#build
 */
declare function buildSync<T extends BuildOptions>(options: SameShape<BuildOptions, T>): BuildResult<T>;
/**
 * A synchronous version of "transform".
 *
 * - Works in node: yes
 * - Works in browser: no
 *
 * Documentation: https://esbuild.github.io/api/#transform
 */
declare function transformSync<T extends TransformOptions>(input: string | Uint8Array, options?: SameShape<TransformOptions, T>): TransformResult<T>;
/**
 * A synchronous version of "formatMessages".
 *
 * - Works in node: yes
 * - Works in browser: no
 */
declare function formatMessagesSync(messages: PartialMessage[], options: FormatMessagesOptions): string[];
/**
 * A synchronous version of "analyzeMetafile".
 *
 * - Works in node: yes
 * - Works in browser: no
 *
 * Documentation: https://esbuild.github.io/api/#analyze
 */
declare function analyzeMetafileSync(metafile: string | Metafile, options?: AnalyzeMetafileOptions): string;
/**
 * This configures the browser-based version of esbuild. It is necessary to
 * call this first and wait for the returned promise to be resolved before
 * making other API calls when using esbuild in the browser.
 *
 * - Works in node: yes
 * - Works in browser: yes ("options" is required)
 *
 * Documentation: https://esbuild.github.io/api/#browser
 */
declare function initialize(options: InitializeOptions): Promise<void>;
interface InitializeOptions {
  /**
   * The URL of the "esbuild.wasm" file. This must be provided when running
   * esbuild in the browser.
   */
  wasmURL?: string | URL;
  /**
   * The result of calling "new WebAssembly.Module(buffer)" where "buffer"
   * is a typed array or ArrayBuffer containing the binary code of the
   * "esbuild.wasm" file.
   *
   * You can use this as an alternative to "wasmURL" for environments where it's
   * not possible to download the WebAssembly module.
   */
  wasmModule?: WebAssembly.Module;
  /**
   * By default esbuild runs the WebAssembly-based browser API in a web worker
   * to avoid blocking the UI thread. This can be disabled by setting "worker"
   * to false.
   */
  worker?: boolean;
}
declare const version: string;
declare global {
  namespace WebAssembly {
    interface Module {}
  }
  interface URL {}
}
//#endregion
//#region src/config/packages/esbuild-loader.d.ts
type Filter = string | RegExp;
interface Implementation {
  transform: typeof transform;
}
type Except<ObjectType, Properties> = { [Key in keyof ObjectType as Key extends Properties ? never : Key]: ObjectType[Key]; };
type ESBuildPluginOptions = Except<TransformOptions, 'sourcefile' | 'sourcemap'> & {
  css?: boolean;
  exclude?: Filter | Filter[];
  /** Pass a custom esbuild implementation */
  implementation?: Implementation;
  include?: Filter | Filter[];
};
//#endregion
//#region src/config/packages/terser.d.ts
type ECMA = 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 5;
type ConsoleProperty = keyof typeof console;
type DropConsoleOption = boolean | ConsoleProperty[];
interface ParseOptions {
  bare_returns?: boolean;
  /** @deprecated legacy option. Currently, all supported EcmaScript is valid to parse. */
  ecma?: ECMA;
  html5_comments?: boolean;
  shebang?: boolean;
}
interface CompressOptions {
  arguments?: boolean;
  arrows?: boolean;
  booleans_as_integers?: boolean;
  booleans?: boolean;
  collapse_vars?: boolean;
  comparisons?: boolean;
  computed_props?: boolean;
  conditionals?: boolean;
  dead_code?: boolean;
  defaults?: boolean;
  directives?: boolean;
  drop_console?: DropConsoleOption;
  drop_debugger?: boolean;
  ecma?: ECMA;
  evaluate?: boolean;
  expression?: boolean;
  global_defs?: object;
  hoist_funs?: boolean;
  hoist_props?: boolean;
  hoist_vars?: boolean;
  ie8?: boolean;
  if_return?: boolean;
  inline?: boolean | InlineFunctions;
  join_vars?: boolean;
  keep_classnames?: boolean | RegExp;
  keep_fargs?: boolean;
  keep_fnames?: boolean | RegExp;
  keep_infinity?: boolean;
  lhs_constants?: boolean;
  loops?: boolean;
  module?: boolean;
  negate_iife?: boolean;
  passes?: number;
  properties?: boolean;
  pure_funcs?: string[];
  pure_new?: boolean;
  pure_getters?: 'strict' | boolean;
  reduce_funcs?: boolean;
  reduce_vars?: boolean;
  sequences?: boolean | number;
  side_effects?: boolean;
  switches?: boolean;
  toplevel?: boolean;
  top_retain?: string | RegExp | string[] | null;
  typeofs?: boolean;
  unsafe_arrows?: boolean;
  unsafe?: boolean;
  unsafe_comps?: boolean;
  unsafe_Function?: boolean;
  unsafe_math?: boolean;
  unsafe_symbols?: boolean;
  unsafe_methods?: boolean;
  unsafe_proto?: boolean;
  unsafe_regexp?: boolean;
  unsafe_undefined?: boolean;
  unused?: boolean;
}
declare enum InlineFunctions {
  Disabled = 0,
  SimpleFunctions = 1,
  WithArguments = 2,
  WithArgumentsAndVariables = 3
}
interface MangleOptions {
  eval?: boolean;
  keep_classnames?: boolean | RegExp;
  keep_fnames?: boolean | RegExp;
  module?: boolean;
  nth_identifier?: SimpleIdentifierMangler | WeightedIdentifierMangler;
  properties?: boolean | ManglePropertiesOptions;
  reserved?: string[];
  safari10?: boolean;
  toplevel?: boolean;
}
/**
 * An identifier mangler for which the output is invariant with respect to the source code.
 */
interface SimpleIdentifierMangler {
  /**
   * Obtains the nth most favored (usually shortest) identifier to rename a variable to.
   * The mangler will increment n and retry until the return value is not in use in scope, and is not a reserved word.
   * This function is expected to be stable; Evaluating get(n) === get(n) should always return true.
   * @param n - The ordinal of the identifier.
   */
  get(n: number): string;
}
/**
 * An identifier mangler that leverages character frequency analysis to determine identifier precedence.
 */
interface WeightedIdentifierMangler extends SimpleIdentifierMangler {
  /**
   * Modifies the internal weighting of the input characters by the specified delta.
   * Will be invoked on the entire printed AST, and then deduct mangleable identifiers.
   * @param chars - The characters to modify the weighting of.
   * @param delta - The numeric weight to add to the characters.
   */
  consider(chars: string, delta: number): number;
  /**
   * Resets character weights.
   */
  reset(): void;
  /**
   * Sorts identifiers by character frequency, in preparation for calls to get(n).
   */
  sort(): void;
}
interface ManglePropertiesOptions {
  builtins?: boolean;
  debug?: boolean;
  keep_quoted?: 'strict' | boolean;
  nth_identifier?: SimpleIdentifierMangler | WeightedIdentifierMangler;
  regex?: string | RegExp;
  reserved?: string[];
}
interface FormatOptions {
  ascii_only?: boolean;
  /** @deprecated Not implemented anymore */
  beautify?: boolean;
  braces?: boolean;
  comments?: 'all' | 'some' | boolean | RegExp | ((node: any, comment: {
    col: number;
    line: number;
    pos: number;
    type: 'comment1' | 'comment2' | 'comment3' | 'comment4';
    value: string;
  }) => boolean);
  ecma?: ECMA;
  ie8?: boolean;
  keep_numbers?: boolean;
  indent_level?: number;
  indent_start?: number;
  inline_script?: boolean;
  keep_quoted_props?: boolean;
  max_line_len?: false | number;
  preamble?: string;
  preserve_annotations?: boolean;
  quote_keys?: boolean;
  quote_style?: OutputQuoteStyle;
  safari10?: boolean;
  semicolons?: boolean;
  shebang?: boolean;
  shorthand?: boolean;
  source_map?: SourceMapOptions;
  webkit?: boolean;
  width?: number;
  wrap_iife?: boolean;
  wrap_func_args?: boolean;
}
declare enum OutputQuoteStyle {
  PreferDouble = 0,
  AlwaysSingle = 1,
  AlwaysDouble = 2,
  AlwaysOriginal = 3
}
interface MinifyOptions$1 {
  compress?: boolean | CompressOptions;
  ecma?: ECMA;
  enclose?: boolean | string;
  ie8?: boolean;
  keep_classnames?: boolean | RegExp;
  keep_fnames?: boolean | RegExp;
  mangle?: boolean | MangleOptions;
  module?: boolean;
  nameCache?: object;
  format?: FormatOptions;
  /** @deprecated */
  output?: FormatOptions;
  parse?: ParseOptions;
  safari10?: boolean;
  sourceMap?: boolean | SourceMapOptions;
  toplevel?: boolean;
}
interface SourceMapOptions {
  /** Source map object, 'inline' or source map file content */
  content?: string | SectionedSourceMapInput;
  includeSources?: boolean;
  filename?: string;
  root?: string;
  asObject?: boolean;
  url?: 'inline' | string;
}
//#endregion
//#region src/config/packages/html-webpack-plugin.d.ts
declare class HtmlWebpackPlugin {
  constructor(options?: HtmlWebpackPlugin.Options);
  userOptions: HtmlWebpackPlugin.Options;
  /** Current HtmlWebpackPlugin Major */
  version: number;
  /**
   * Options after html-webpack-plugin has been initialized with defaults
   */
  options?: HtmlWebpackPlugin.ProcessedOptions;
  apply(compiler: WebpackCompiler): void;
  static getHooks(compilation: WebpackCompilation): HtmlWebpackPlugin.Hooks;
  static getCompilationHooks(compilation: WebpackCompilation): HtmlWebpackPlugin.Hooks;
  /**
   * Static helper to create a tag object to be get injected into the dom
   */
  static createHtmlTagObject(tagName: string, attributes?: Record<string, boolean | string>, innerHTML?: string): HtmlWebpackPlugin.HtmlTagObject;
  static readonly version: number;
}
declare namespace HtmlWebpackPlugin {
  type MinifyOptions = Options$1;
  interface Options {
    /**
     * Emit the file only if it was changed.
     * @default true
     */
    cache?: boolean;
    /**
     * List all entries which should be injected
     */
    chunks?: 'all' | string[];
    /**
     * Allows to control how chunks should be sorted before they are included to the html.
     * @default 'auto'
     */
    chunksSortMode?: 'auto' | 'manual' | 'none' | ((entryNameA: string, entryNameB: string) => number);
    /**
     * List all entries which should not be injected
     */
    excludeChunks?: string[];
    /**
     * Path to the favicon icon
     */
    favicon?: false | string;
    /**
     * The file to write the HTML to.
     * Supports subdirectories eg: `assets/admin.html`
     * [name] will be replaced by the entry name
     * Supports a function to generate the name
     *
     * @default 'index.html'
     */
    filename?: string | ((entryName: string) => string);
    /**
     * By default the public path is set to `auto` - that way the html-webpack-plugin will try
     * to set the publicPath according to the current filename and the webpack publicPath setting
     */
    publicPath?: 'auto' | string;
    /**
     * If `true` then append a unique `webpack` compilation hash to all included scripts and CSS files.
     * This is useful for cache busting
     */
    hash?: boolean;
    /**
     * Inject all assets into the given `template` or `templateContent`.
     */
    inject?: 'body' | 'head' | false | true;
    /**
     * Set up script loading
     * blocking will result in <script src="..."></script>
     * defer will result in <script defer src="..."></script>
     *
     * @default 'defer'
     */
    scriptLoading?: 'blocking' | 'defer' | 'module' | 'systemjs-module';
    /**
     * Inject meta tags
     */
    meta?: false | Record<string, false | string | Record<string, boolean | string>>;
    /**
     * HTML Minification options accepts the following values:
     * - Set to `false` to disable minification
     * - Set to `'auto'` to enable minification only for production mode
     * - Set to custom minification according to
     * {@link https://github.com/kangax/html-minifier#options-quick-reference}
     */
    minify?: 'auto' | boolean | MinifyOptions;
    /**
     * Render errors into the HTML page
     */
    showErrors?: boolean;
    /**
     * The `webpack` require path to the template.
     * @see https://github.com/jantimon/html-webpack-plugin/blob/master/docs/template-option.md
     */
    template?: string;
    /**
     * Allow to use a html string instead of reading from a file
     */
    templateContent?: false | string | Promise<string> | ((templateParameters: Record<string, any>) => string | Promise<string>);
    /**
     * Allows to overwrite the parameters used in the template
     */
    templateParameters?: false | ((compilation: WebpackCompilation, assets: {
      css: string[];
      js: string[];
      publicPath: string;
      favicon?: string;
      manifest?: string;
    }, assetTags: {
      bodyTags: HtmlTagObject[];
      headTags: HtmlTagObject[];
    }, options: ProcessedOptions) => Promise<Record<string, any>> | Record<string, any>) | Record<string, any>;
    /**
     * The title to use for the generated HTML document
     */
    title?: string;
    /**
     * Enforce self closing tags e.g. <link />
     */
    xhtml?: boolean;
    /**
     * In addition to the options actually used by this plugin, you can use this hash to pass arbitrary data through
     * to your template.
     */
    [option: string]: any;
  }
  /**
   * The plugin options after adding default values
   */
  interface ProcessedOptions extends Required<Options> {
    filename: string;
  }
  /**
   * The values which are available during template execution
   *
   * Please keep in mind that the `templateParameter` options allows to change them
   */
  interface TemplateParameter {
    compilation: WebpackCompilation;
    htmlWebpackPlugin: {
      options: Options;
      files: {
        css: string[];
        js: string[];
        publicPath: string;
        favicon?: string;
        manifest?: string;
      };
      tags: {
        bodyTags: HtmlTagObject[];
        headTags: HtmlTagObject[];
      };
    };
    webpackConfig: any;
  }
  interface Hooks {
    alterAssetTags: AsyncSeriesWaterfallHook<{
      outputName: string;
      plugin: HtmlWebpackPlugin;
      publicPath: string;
      assetTags: {
        meta: HtmlTagObject[];
        scripts: HtmlTagObject[];
        styles: HtmlTagObject[];
      };
    }>;
    alterAssetTagGroups: AsyncSeriesWaterfallHook<{
      bodyTags: HtmlTagObject[];
      headTags: HtmlTagObject[];
      outputName: string;
      plugin: HtmlWebpackPlugin;
      publicPath: string;
    }>;
    afterTemplateExecution: AsyncSeriesWaterfallHook<{
      bodyTags: HtmlTagObject[];
      headTags: HtmlTagObject[];
      html: string;
      outputName: string;
      plugin: HtmlWebpackPlugin;
    }>;
    beforeAssetTagGeneration: AsyncSeriesWaterfallHook<{
      outputName: string;
      plugin: HtmlWebpackPlugin;
      assets: {
        css: string[];
        js: string[];
        publicPath: string;
        favicon?: string;
        manifest?: string;
      };
    }>;
    beforeEmit: AsyncSeriesWaterfallHook<{
      html: string;
      outputName: string;
      plugin: HtmlWebpackPlugin;
    }>;
    afterEmit: AsyncSeriesWaterfallHook<{
      outputName: string;
      plugin: HtmlWebpackPlugin;
    }>;
  }
  /**
   * A tag element according to the htmlWebpackPlugin object notation
   */
  interface HtmlTagObject {
    /**
     * Attributes of the html tag
     * E.g. `{'disabled': true, 'value': 'demo'}`
     */
    attributes: Record<string, boolean | string | null | undefined>;
    /**
     * The tag name e.g. `'div'`
     */
    tagName: string;
    /**
     * The inner HTML
     */
    innerHTML?: string;
    /**
     * Whether this html must not contain innerHTML
     * @see https://www.w3.org/TR/html5/syntax.html#void-elements
     */
    voidTag: boolean;
    /**
     * Meta information about the tag
     * E.g. `{'plugin': 'html-webpack-plugin'}`
     */
    meta: {
      plugin?: string;
      [metaAttributeName: string]: any;
    };
  }
}
type HtmlWebpackPluginOptions = HtmlWebpackPlugin.Options;
//#endregion
//#region src/config/common.d.ts
/**
 * `Webpack devtool` 类型
 *
 * @see https://webpack.js.org/configuration/devtool/#devtool
 */
type SourceMapType = LiteralUnion<'cheap-module-source-map' | 'cheap-source-map' | 'eval-cheap-module-source-map' | 'eval-cheap-source-map' | 'eval-nosources-cheap-module-source-map' | 'eval-nosources-cheap-source-map' | 'eval-nosources-source-map' | 'eval-source-map' | 'eval' | 'hidden-cheap-module-source-map' | 'hidden-cheap-source-map' | 'hidden-nosources-cheap-module-source-map' | 'hidden-nosources-cheap-source-map' | 'hidden-nosources-source-map' | 'hidden-source-map' | 'inline-cheap-module-source-map' | 'inline-cheap-source-map' | 'inline-nosources-cheap-module-source-map' | 'inline-nosources-cheap-source-map' | 'inline-nosources-source-map' | 'inline-source-map' | 'nosources-cheap-module-source-map' | 'nosources-cheap-source-map' | 'nosources-source-map' | 'source-map'>;
type PlatformUnion = LiteralUnion<'h5' | 'harmony' | 'mini' | 'rn'>;
interface ConfigurablePlugin<T extends Record<string, any>> {
  enable?: boolean;
  config?: T;
}
interface FilterOptions {
  /**
   * 需要额外执行预编译的依赖
   */
  include?: string[];
  /**
   * 不需要执行预编译的依赖
   */
  exclude?: string[];
}
/**
 * 编译过程配置
 */
type ICompileOptions = FilterOptions & {
  /**
   * 对应 `@rollup/plugin-babel` 插件的 filter 配置。
   *
   * 只在 vite 编译模式下有效
   */
  filter?: (filename: string) => boolean;
};
/**
 * 输出文件类型增强
 */
interface IOutputEnhance {
  /**
   * 编译前清空输出目录
   * @since Taro v3.6.9
   * @description
   * - 默认清空输出目录，可设置 clean: false 不清空
   * - 可设置 clean: { keep: ['project.config.json'] } 保留指定文件
   * - 注意 clean.keep 不支持函数
   */
  clean?: boolean | {
    keep?: string | (string | RegExp)[] | RegExp;
  };
}
/**
 * 小程序编译时的文件类型集合
 */
type ParseAstType = LiteralUnion<'COMPONENT' | 'ENTRY' | 'NORMAL' | 'PAGE' | 'STATIC'>;
interface BasePostCSSOptions {
  autoprefixer?: ConfigurablePlugin<AutoprefixerOptions>;
  pxtransform?: ConfigurablePlugin<PostcssPxtransformOptions>;
  cssModules?: ConfigurablePlugin<PostcssCssModulesOptions>;
  htmltransform?: ConfigurablePlugin<PostcssHtmlTransformOptions>;
  [key: string]: any;
}
type PostCSSOptions<T extends PlatformUnion> = T extends 'h5' ? BasePostCSSOptions & {
  url?: ConfigurablePlugin<PostcssUrlOptions>;
} : BasePostCSSOptions;
/**
 * 通用 webpack 配置选项
 */
interface BaseWebpackConfigOptions {
  /**
   * `css-loader` 的附加配置
   *
   * @see https://github.com/webpack-contrib/css-loader
   */
  cssLoaderOption?: CSSLoaderOptions;
  /**
   * 针对 `woff | woff2 | eot | ttf | otf` 文件 `url-loader` 的配置
   *
   * @see https://github.com/webpack-contrib/url-loader
   */
  fontUrlLoaderOption?: URLLoaderOptions;
  /**
   * 针对 `png | jpg | jpeg | gif | bpm | svg` 文件 `url-loader` 的配置
   *
   * @see https://github.com/webpack-contrib/url-loader
   */
  imageUrlLoaderOption?: URLLoaderOptions;
  /**
   * `less-loader` 的附加配置
   *
   * @see https://github.com/webpack-contrib/less-loader
   */
  lessLoaderOption?: LessLoaderOptions;
  /**
   * 针对 `mp4 | webm | ogg | mp3 | wav | flac | aac` 文件 `url-loader` 的配置
   *
   * @see https://github.com/webpack-contrib/url-loader
   */
  mediaUrlLoaderOption?: URLLoaderOptions;
  /**
   * `mini-css-extract-plugin` 的附加配置
   *
   * @see https://github.com/webpack-contrib/mini-css-extract-plugin
   */
  miniCssExtractPluginOption?: MiniCSSExtractPluginOptions;
  /**
   * `sass-loader` 的附加配置
   *
   * @see https://github.com/webpack-contrib/sass-loader
   */
  sassLoaderOption?: SassLoaderOptions;
  /**
   * `stylus-loader` 的附加配置
   *
   * @see https://github.com/webpack-contrib/stylus-loader
   */
  stylusLoaderOption?: StylusLoaderOptions;
  /**
   * 自定义 `Webpack` 配置
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#miniwebpackchain
   */
  webpackChain?: (chain: ChainableWebpackConfig, webpack: Webpack, parseAstType: ParseAstType) => void;
}
type CommonWebpackConfigOptions<T extends PlatformUnion> = T extends 'h5' ? BaseWebpackConfigOptions : BaseWebpackConfigOptions & {
  /**
   * `style-loader` 的附加配置
   * @see https://github.com/webpack-contrib/style-loader
   */
  styleLoaderOption?: StyleLoaderOptions;
};
/**
 * `additionalData` 类型
 *  @description
 *  - `less-loader` 附加数据
 *  - `sass-loader` 附加数据
 *  - `stylus-loader` 附加数据
 */
type LoaderAdditionalData<T extends 'less' | 'sass' | 'stylus'> = string | (T extends 'stylus' ? (content: string | Buffer, loaderContext: WebpackLoaderContext, meta: any) => Awaitable<string> : (content: string, loaderContext: WebpackLoaderContext) => Awaitable<string>);
//#endregion
//#region src/config/compiler.d.ts
type CompilerViteTypes = 'vite';
type CompilerWebpackTypes = 'webpack5';
type CompilerTypes = CompilerViteTypes | CompilerWebpackTypes;
/**
 * @see https://github.com/NervJS/taro/blob/6a7779d98102c9b7b0082ababbac342cbff2d213/packages/taro-plugin-vue-devtools/src/index.ts#L79C44-L79C47
 */
type CompilerPrebundleWebpackProvideFn = (obj: Record<string, any>, taroRuntimeBundlePath: string) => void;
interface CompilerPrebundle extends FilterOptions {
  /**
   * 是否开启依赖预编译
   */
  enable?: boolean;
  /**
   * 缓存目录的绝对路径
   */
  cacheDir?: string;
  /**
   * 是否强行弃用缓存
   */
  force?: boolean;
  /**
   * 是否显示依赖预编译的测速信息
   */
  timings?: boolean;
  /**
   * 自定义 `esbuild` 配置
   *
   * @see https://esbuild.github.io/api/#build
   */
  esbuild?: BuildOptions;
  /**
   * 自定义 `swc` 配置
   *
   * @see https://swc.rs/docs/usage/core#options
   */
  swc?: SWCConfig;
  /**
   * 自定义 `webpack` 配置
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail/#compilerprebundlewebpackprovide
   */
  webpack?: WebpackConfiguration & {
    provide?: CompilerPrebundleWebpackProvideFn[];
  };
}
interface CompilerConfig<T> {
  /**
   * 编译工具
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#compilertype
   */
  type: T;
  /**
   * 错误处理级别
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#compilererrorlevel
   * @default 0
   */
  errorLevel?: number;
  /**
   * 依赖预编译，仅 `webpack5` 支持
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#compilerprebundle
   */
  prebundle?: CompilerPrebundle;
  /**
   * Vite 插件，仅 `vite` 支持
   */
  vitePlugins?: VitePlugin[];
}
type Compiler$1<T extends CompilerTypes = CompilerWebpackTypes> = CompilerConfig<T> | T;
//#endregion
//#region src/config/copy.d.ts
type CopyIgnore = string | string[];
interface CopyPattern {
  from: string;
  to: string;
  ignore?: CopyIgnore;
  transform?: (...args: any[]) => any;
  watch?: boolean;
}
interface CopyOptions {
  ignore?: CopyIgnore;
}
interface Copy {
  patterns?: CopyPattern[];
  options?: CopyOptions;
}
//#endregion
//#region src/config/logger.d.ts
interface Logger {
  /**
   * 是否简化输出日志
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#quiet
   * @default true
   */
  quiet?: boolean;
  /**
   * 是否输出 `Webpack Stats` 信息
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#stats
   * @default false
   */
  stats?: boolean;
}
//#endregion
//#region src/config/minimizers/js.d.ts
type JSMinimizer = LiteralUnion<'esbuild' | 'terser'>;
type TerserMinimizer = ConfigurablePlugin<MinifyOptions$1>;
interface EsbuildMinimizer {
  /**
   * 配置 `ESBuildMinifyPlugin`
   *
   * @see https://github.com/esbuild-kit/esbuild-loader#minification
   */
  minify?: ConfigurablePlugin<ESBuildPluginOptions>;
}
//#endregion
//#region src/config/minimizers/css.d.ts
type CSSMinimizer = LiteralUnion<'csso' | 'esbuild' | 'lightningcss'>;
type CSSOMinimizer = ConfigurablePlugin<CSSNanoOptions>;
//#endregion
//#region src/config/platforms/h5.d.ts
interface PlatformH5Router {
  /**
   * 配置路由模式
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#h5routermode
   */
  mode?: LiteralUnion<'browser' | 'hash' | 'multi'>;
  /**
   * 配置路由基准路径
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#h5routerbasename
   */
  basename?: string;
  /**
   * 配置自定义路由
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#h5routercustomroutes
   */
  customRoutes?: Record<string, string | string[]>;
  lazyload?: boolean | ((pagename: string) => boolean);
  renamePagename?: (pagename: string) => string;
  forcePath?: string;
  /**
   * 加上这个参数，可以解决返回页面的时候白屏的问题，但是某些不支持 :has() 选择器的浏览器会有问题
   */
  enhanceAnimation?: boolean;
}
interface PlatformH5<T extends CompilerTypes = CompilerWebpackTypes> extends CommonWebpackConfigOptions<'h5'> {
  /**
   * 可用于修改、拓展 `Webpack` 的 `input` 选项
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#h5entry
   */
  entry?: Record<string, string | string[]>;
  /**
   * webpack 编译模式下，可用于修改、拓展 Webpack 的 output 选项，配置项参考[官方文档](https://webpack.js.org/configuration/output/)
   *
   * vite 编译模式下，用于修改、扩展 rollup 的 output，目前仅适配 chunkFileNames 和 assetFileNames 两个配置，修改其他配置请使用 vite 插件进行修改。配置想参考[官方文档](https://rollupjs.org/configuration-options/)
   */
  output?: T extends 'vite' ? IOutputEnhance & Pick<RollupOutputOptions, 'assetFileNames' | 'chunkFileNames'> : WebpackConfiguration['output'];
  /**
   * 设置输出解析文件的目录
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#h5publicpath
   * @default `/`
   */
  publicPath?: string;
  /**
   * `h5` 编译后的静态文件目录
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#h5staticdirectory
   * @default `static`
   */
  staticDirectory?: string;
  /**
   * 编译后非 `entry` 的 `js` 文件的存放目录，主要影响动态引入的 `pages` 的存放路径
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#h5chunkdirectory
   * @default `chunk`
   */
  chunkDirectory?: string;
  /**
   * Webpack 配置
   */
  webpack?: WebpackConfiguration | ((config: WebpackConfiguration, webpack: Webpack) => WebpackConfiguration);
  /**
   * 预览服务的配置，可以更改端口等参数
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#h5devserver
   */
  devServer?: T extends 'vite' ? ViteServerOptions : WebpackDevServerConfiguration;
  /**
   * 路由相关的配置
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#h5router
   */
  router?: PlatformH5Router;
  /**
   * 用于控制是否生成 `js、css` 对应的 `sourceMap`
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#h5enablesourcemap
   * @default watch 模式下为 true，否则为 false
   */
  enableSourceMap?: boolean;
  /**
   * `SourceMap` 类型
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#h5sourcemaptype
   * @default `cheap-module-eval-source-map`
   */
  sourceMapType?: SourceMapType;
  /**
   * 用于控制在 H5 端是否使用兼容性组件库
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#h5usehtmlcomponents
   * @default false
   */
  useHtmlComponents?: boolean;
  /**
   * `extract` 功能开关，开启后将使用 `mini-css-extract-plugin` 分离 `css` 文件
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#h5enableextract
   * @default watch 模式下为 false，否则为 true
   */
  enableExtract?: boolean;
  /**
   * 配置需要额外的经由 `Taro` 预设的 `postcss` 编译的模块
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#h5esnextmodules
   */
  esnextModules?: string[];
  /**
   * 配置 `postcss` 相关插件
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#h5postcss
   */
  postcss?: PostCSSOptions<'h5'>;
  /**
   * Web 编译过程的相关配置
   *
   * @since `Taro v3.6`
   * @see https://nervjs.github.io/taro-docs/docs/config-detail/#h5compile
   */
  compile?: ICompileOptions;
  /**
   * 控制在 H5 端是否使用旧版本适配器
   *
   * @since `Taro v3.6.3`
   * @see https://nervjs.github.io/taro-docs/docs/config-detail/#h5usedeprecatedadaptercomponent
   * @default false
   */
  useDeprecatedAdapterComponent?: boolean;
  /**
   * `html-webpack-plugin` 的具体配置
   *
   * @since `Taro v3.5`
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#h5htmlpluginoption
   */
  htmlPluginOption?: HtmlWebpackPluginOptions;
  /**
   * 生成的代码是否要兼容旧版浏览器，值为 true 时，会去读取 package.json 的 browserslist 字段。
   * 只在 vite 编译模式下有效
   */
  legacy?: T extends 'vite' ? boolean : undefined;
  /**
   * 使用的编译工具。可选值：webpack5、vite
   */
  compiler?: Compiler$1<T>;
  [key: string]: any;
}
//#endregion
//#region src/config/platforms/rn.d.ts
/**
 * @internal
 */
interface ProcessorOptionsWithAdditionalData<T, P extends 'less' | 'sass' | 'stylus'> {
  additionalData?: LoaderAdditionalData<P>;
  options?: T;
}
/**
 * @see https://github.com/NervJS/taro/blob/main/packages/taro-rn-style-transformer/README.md#rnpostcss
 */
interface PlatformRNPostCSSOptions {
  /**
   * PostCSS 配置
   * @see https://github.com/postcss/postcss#options
   */
  options?: Record<string, any>;
  /**
   * 控制是否对 css value 进行 scalePx2dp 转换，pxtransform 配置 enable 才生效
   * @default true
   */
  scalable?: boolean;
  /**
   * `pxtransform.enable`
   * @default true
   */
  pxtransform?: ConfigurablePlugin<PostcssPxtransformOptions>;
  /**
   * `cssModules.enable`
   * @default false
   */
  cssModules?: ConfigurablePlugin<PostcssCssModulesOptions>;
  [key: string]: any;
}
interface PlatformRNResolve {
  /**
   * 配置多个 npm 包名的数组，将 npm 包当作项目文件处理
   */
  include: string[];
  [key: string]: any;
}
interface PlatformRNNativeComponents {
  /**
   * 外部依赖
   */
  external?: (string | RegExp)[] | ((array: (string | RegExp)[]) => (string | RegExp)[]);
  /**
   * 设置外部依赖，如果返回 `string`, 则将该值作为 `external`
   *
   * @description 默认将 `node_modules` 路径下的文件设置为外部依赖
   */
  externalResolve?: (importee: string, importer: string) => string;
  /**
   * 组件输出路径
   *
   * @default `dist`
   */
  output?: string;
  /**
   * 修改 `Rollup` 打包配置
   */
  modifyRollupConfig?: (config: RollupOptions, innerPlugins: {
    styleTransformer: any;
    taroResolver: any;
  }) => RollupOptions;
}
interface PlatformRN {
  /**
   * 设置 `RN bundle` 中注册应用的名称
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#rnappname
   */
  appName?: string;
  /**
   * `entry` 利用模块查找规则 `{name}.{platform}.{ext}` 自动区分平台
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#rnentry
   */
  entry?: string;
  /**
   * 设置 `Metro` 打包生成 `bundle` 的输出路径
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#rnoutput
   */
  output?: Record<string, string>;
  /**
   * `postcss` 相关配置，其他样式语言预处理后经过此配置
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#rnpostcss
   */
  postcss?: PlatformRNPostCSSOptions;
  /**
   * `sass` 相关配置
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#rnsass
   */
  sass?: ProcessorOptionsWithAdditionalData<DartSassOptions | NodeSassOptions, 'sass'>;
  /**
   * `less` 相关配置
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#rnless
   */
  less?: ProcessorOptionsWithAdditionalData<LessOptions, 'less'>;
  /**
   * `stylus` 相关配置
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#rnstylus
   */
  stylus?: ProcessorOptionsWithAdditionalData<StylusOptions, 'stylus'>;
  /**
   * `resolve` 处理依赖文件配置
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#rnresolve
   */
  resolve?: PlatformRNResolve;
  /**
   * 支持多 `className` 转换，以 `classname` 或 `style` 结尾的，提取前缀，然后根据前缀，再生成对应的 `xxxStyle`
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#rnenablemultipleclassname
   * @default false
   */
  enableMultipleClassName?: boolean;
  /**
   * 当标签 `style` 属性值是数组时转换成对象
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#rnenablemergestyle
   * @default false
   */
  enableMergeStyle?: boolean;
  /**
   * 将 `svg` 文件转换为组件引入
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#rnenablesvgtransform
   * @default false
   */
  enableSvgTransform?: boolean;
  /**
   * 别名
   */
  alias?: Record<string, any>;
  /**
   * 设计稿尺寸
   */
  designWidth?: DesignWidth;
  /**
   * 设计稿尺寸换算规则
   */
  designRatio?: DesignRatio;
  /**
   * 原生组件编译配置
   */
  nativeComponents?: PlatformRNNativeComponents;
  [key: string]: any;
}
//#endregion
//#region src/config/platforms/mini.d.ts
interface PlatformMiniMinifyXML {
  /**
   * 是否合并 xml 文件中的空格
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail/#miniminifyxmlcollapsewhitespace
   * @default false
   */
  collapseWhitespace?: boolean;
}
interface PlatformMiniOptimizeMainPackage {
  enable?: boolean;
  exclude?: string[];
}
interface PlatformMiniExperimental {
  /**
   * 半编译模式，暂只支持 `React` 框架
   *
   * @since `Taro v3.6.23`
   * @see https://nervjs.github.io/taro-docs/docs/complier-mode
   * @default false
   */
  compileMode?: boolean | string;
  /**
   * 模版渲染时是否使用 wxs 等小程序脚本语言
   */
  useXsForTemplate?: boolean;
}
interface PlatformMiniRuntime {
  enableInnerHTML?: boolean;
  enableSizeAPIs?: boolean;
  enableAdjacentHTML?: boolean;
  enableTemplateContent?: boolean;
  enableCloneNode?: boolean;
  enableContains?: boolean;
  enableMutationObserver?: boolean;
}
/**
 * 小程序端专用配置
 *
 * @see https://nervjs.github.io/taro-docs/docs/config-detail#mini
 */
interface PlatformMini<T extends CompilerTypes = CompilerWebpackTypes> extends CommonWebpackConfigOptions<'mini'> {
  /**
   * 对于 `template` 模板不支持递归的小程序（如：微信、QQ、京东），Taro 会对所有模板循环 `baseLevel` 次，以支持同类模板的循环调用
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#minibaselevel
   */
  baseLevel?: number;
  /**
   * webpack 编译模式下，可用于修改、拓展 Webpack 的 output 选项，配置项参考[官方文档](https://webpack.js.org/configuration/output/)
   *
   * vite 编译模式下，用于修改、扩展 rollup 的 output，目前仅适配 chunkFileNames 和 assetFileNames 两个配置，修改其他配置请使用 vite 插件进行修改。配置想参考[官方文档](https://rollupjs.org/configuration-options/)
   */
  output?: T extends 'vite' ? IOutputEnhance & Pick<RollupOutputOptions, 'chunkFileNames'> : IOutputEnhance & WebpackConfiguration['output'];
  /**
   * 用于控制是否生成 `js、css` 对应的 `sourceMap`
   *
   * @default watch 模式下为 true，否则为 false
   */
  enableSourceMap?: boolean;
  /**
   * `SourceMap` 类型
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail/#minisourcemaptype
   * @default `cheap-module-source-map`
   */
  sourceMapType?: SourceMapType;
  /**
   * 关于压缩小程序 `xml` 文件的相关配置
   *
   * @since `Taro v3.0.8`
   * @see https://nervjs.github.io/taro-docs/docs/config-detail/#miniminifyxml
   */
  minifyXML?: PlatformMiniMinifyXML;
  /**
   * 是否注入兼容微信小程序热重载的代码
   *
   * @since `Taro v3.4.0`
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#minihot
   * @default false
   */
  hot?: boolean;
  /**
   * 指定 React 框架相关的代码是否使用开发环境（未压缩）代码，默认使用生产环境（压缩后）代码
   *
   * @since `Taro v3.0.8`
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#minidebugreact
   * @default false
   */
  debugReact?: boolean;
  /**
   * 是否跳过第三方依赖 usingComponent 的处理，默认为自动处理第三方依赖的自定义组件
   *
   * @since `Taro v3.6.13`
   * @default false
   */
  skipProcessUsingComponents?: boolean;
  /**
   * 用于告诉 Taro 编译器需要抽取的公共文件
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail/#minicommonchunks
   */
  commonChunks?: string[] | ((commonChunks: string[]) => string[]);
  /**
   * 为某些页面单独指定需要引用的公共文件
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail/#miniaddchunkpages
   */
  addChunkPages?: (pages: Map<string, string[]>, pagesNames?: string[]) => void;
  /**
   * 优化主包的体积大小
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail/#minioptimizemainpackage
   */
  optimizeMainPackage?: PlatformMiniOptimizeMainPackage;
  /**
   * 配置 `postcss` 相关插件
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail/#minipostcss
   */
  postcss?: PostCSSOptions<'mini'>;
  /**
   * 实验特性
   */
  experimental?: PlatformMiniExperimental;
  /**
   * 小程序编译过程的相关配置
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail/#minicompile
   */
  compile?: ICompileOptions;
  /**
   * 使用的编译工具。可选值：webpack5、vite
   */
  compiler?: Compiler$1<T>;
  /**
   * 运行时选项，插件内部使用
   */
  runtime?: PlatformMiniRuntime;
  [key: string]: any;
}
//#endregion
//#region src/config/platforms/harmony.d.ts
interface PlatformHarmonyOhPackage {
  main?: string;
  dependencies?: Record<string, string>;
  devDependencies?: Record<string, string>;
  [k: string]: any;
}
interface PlatformHarmonyCompileModeSetting {
  componentReplace?: Record<string, {
    current_init: string;
    dependency_define: string;
  }>;
}
interface PlatformHarmonyRouter {
  customRoutes?: Record<string, any>;
}
interface PlatformHarmony<T extends CompilerTypes = CompilerViteTypes> extends CommonWebpackConfigOptions<'harmony'> {
  /**
   * 项目地址
   */
  projectPath: string;
  /**
   * @default `entry`
   */
  hapName?: string;
  /**
   * @default `default`
   */
  name?: string;
  /**
   * oh-package.json 配置
   */
  ohPackage?: PlatformHarmonyOhPackage;
  /**
   * ohpm-cli
   *
   * @default `~/Library/Huawei/ohpm/bin/ohpm"`
   */
  ohpm?: string;
  /**
   * 核心依赖前缀
   * @description 用于告诉编译内容如何解析核心依赖，传入时将直接使用依赖前缀，同时不会为工程导入核心依赖
   */
  chorePackagePrefix?: string;
  /**
   * 公共文件
   */
  commonChunks?: string[] | ((commonChunks: string[]) => string[]);
  /**
   * 编译相关配置
   */
  compile?: ICompileOptions;
  /**
   * 半编译模式下的选项
   */
  compileModeSetting?: PlatformHarmonyCompileModeSetting;
  /**
   * 用于控制是否生成 js、css 对应的 sourceMap
   * @default `true` in when watch mode, otherwise `false`
   */
  enableSourceMap?: boolean;
  /**
   * Webpack sourceMap
   * @default `cheap-module-source-map`
   */
  sourceMapType?: SourceMapType;
  /**
   * 指定 React 框架相关的代码是否使用开发环境（未压缩）代码，默认使用生产环境（压缩后）代码
   */
  debugReact?: boolean;
  /**
   * webpack 编译模式下，可用于修改、拓展 Webpack 的 output 选项，配置项参考[官方文档](https://webpack.js.org/configuration/output/)
   *
   * vite 编译模式下，用于修改、扩展 rollup 的 output，目前仅适配 chunkFileNames 和 assetFileNames 两个配置，修改其他配置请使用 vite 插件进行修改。配置想参考[官方文档](https://rollupjs.org/configuration-options/)
   */
  output?: T extends CompilerViteTypes ? IOutputEnhance & Pick<RollupOutputOptions, 'chunkFileNames'> : IOutputEnhance & WebpackConfiguration['output'];
  /**
   * 路由配置
   */
  router?: PlatformHarmonyRouter;
  /**
   * 自定义 PostCSS 配置
   */
  postcss?: PostCSSOptions<'harmony'>;
  [key: string]: any;
}
//#endregion
//#region src/config/plugins/html.d.ts
/**
 * Options for `@tarojs/plugin-html`
 *
 * @see https://github.com/NervJS/taro/tree/main/packages/taro-plugin-html
 */
interface PluginHtmlOptions {
  pxtransformBlackList?: (string | RegExp)[];
  enableSizeAPIs?: boolean;
  modifyElements?: (inline: string[], block: string[]) => void;
}
//#endregion
//#region src/config/plugins/http.d.ts
/**
 * Options for `@tarojs/plugin-http`
 *
 * @see https://github.com/NervJS/taro/tree/main/packages/taro-plugin-http
 */
interface PluginHttpOptions {
  /**
   * 注入相关代码，支持 document.cookie 通过后端返回 Set-Cookie 响应头来设置 cookie
   *
   * @default false
   */
  enableCookie?: boolean;
  /**
   * 禁用掉 Blob 全局对象
   *
   * @default true
   */
  disabledBlob?: boolean;
  /**
   * 禁用掉 FormData 全局对象
   *
   * @default true
   */
  disabledFormData?: boolean;
}
//#endregion
//#region src/config/plugins/mock.d.ts
type HTTPMethod = LiteralUnion<'CONNECT' | 'DELETE' | 'GET' | 'HEAD' | 'OPTIONS' | 'PATCH' | 'POST' | 'PUT' | 'TRACE'>;
interface PluginMockOptions {
  /**
   * 数据 Mock 服务地址
   * @default `127.0.0.1`
   */
  host?: string;
  /**
   * 数据 Mock 服务端口
   * @default 9527
   */
  port?: number;
  /**
   * 数据 Mock 接口，可以使用 `mock` 目录下文件
   * @see https://github.com/NervJS/taro-plugin-mock?tab=readme-ov-file#%E5%8F%82%E6%95%B0
   */
  mocks?: Record<`${HTTPMethod} ${string}`, Record<string, any>>;
}
//#endregion
//#region src/config/plugins/indie.d.ts
/**
 * Options for `@tarojs/plugin-indie`
 *
 * @see https://github.com/NervJS/taro-plugin-indie
 */
interface PluginIndieOptions {
  /**
   * 插件支持自定义小程序样式处理规则
   * @see https://github.com/NervJS/taro-plugin-indie?tab=readme-ov-file#1-pathstyleimportwithcustomrule
   */
  pathStyleImportWithCustomRule?: (filename: string) => boolean;
}
//#endregion
//#region src/config/plugins/inject.d.ts
/**
 * Options for `@tarojs/plugin-inject`
 *
 * @see https://github.com/NervJS/taro/tree/main/packages/taro-plugin-inject
 */
type VoidComponents = Set<string>;
type NestElements = Map<string, number>;
interface PluginInjectOptions {
  /**
   * 新增同步 API
   */
  syncApis?: string[];
  /**
   * 新增异步 API
   */
  asyncApis?: string[];
  /**
   * 修改、新增组件的属性
   */
  components?: Record<string, Record<string, any>>;
  /**
   * 新增组件时的名称映射
   */
  componentsMap?: Record<string, string>;
  /**
   * 设置第三方自定义组件的属性的默认值
   */
  thirdPartyComponents?: Record<string, Record<string, any>>;
  /**
   * 设置组件是否可以渲染子元素
   */
  voidComponents?: string[] | ((list: VoidComponents) => VoidComponents);
  /**
   * 设置组件模版的循环次数
   */
  nestElements?: Record<string, number> | ((elem: NestElements) => NestElements);
}
//#endregion
//#region src/config/plugins/miniCI.d.ts
/**
 * Options for `@tarojs/plugin-mini-ci`
 *
 * @see https://github.com/NervJS/taro/tree/main/packages/taro-plugin-mini-ci
 */
interface PluginMiniCIOptions {}
//#endregion
//#region src/config/plugins/vueDevtools.d.ts
/**
 * Options for `@tarojs/plugin-vue-devtools`
 *
 * @see https://github.com/NervJS/taro/tree/main/packages/taro-plugin-vue-devtools
 */
interface PluginVueDevtoolsOptions {
  /**
   * 是否启用
   *
   * @default false
   */
  enabled?: boolean;
  /**
   * 主机名
   *
   * @default `localhost`
   */
  hostname?: string;
  /**
   * 端口号
   *
   * @default `8098`
   */
  port?: string;
}
//#endregion
//#region src/config/plugins/reactDevtools.d.ts
/**
 * Options for `@tarojs/plugin-react-devtools`
 *
 * @see https://github.com/NervJS/taro/tree/main/packages/taro-plugin-react-devtools
 */
interface PluginReactDevtoolsOptions {
  /**
   * 是否启用
   *
   * @default false
   */
  enabled?: boolean;
  /**
   * 主机名
   *
   * @default `localhost`
   */
  hostname?: string;
  /**
   * 端口号
   *
   * @default `8097`
   */
  port?: string;
}
//#endregion
//#region src/config/plugins/platformXhs.d.ts
/**
 * Options for `@tarojs/plugin-platform-xhs`
 *
 * @see https://github.com/NervJS/taro-plugin-platform-xhs
 */
interface PluginPlatformXhsOptions {}
//#endregion
//#region src/config/plugins/platformKwai.d.ts
/**
 * Options for `@tarojs/plugin-platform-kwai`
 *
 * @see https://github.com/NervJS/taro-plugin-platform-kwai
 */
interface PluginPlatformKwaiOptions {}
//#endregion
//#region src/config/plugins/platformLark.d.ts
/**
 * Options for `@tarojs/plugin-platform-lark`
 *
 * @see https://github.com/NervJS/taro-plugin-platform-lark
 */
interface PluginPlatformLarkOptions {
  /**
   * Lark 小程序是否支持 PC 端的组件属性
   * @default false
   */
  pc?: boolean;
  /**
   * Lark 小程序编译时的入口文件
   * @see https://github.com/NervJS/taro-plugin-platform-lark?tab=readme-ov-file#%E6%8F%92%E4%BB%B6%E9%80%89%E9%A1%B9
   * @default undefined
   */
  entry?: string;
}
//#endregion
//#region src/config/plugins/platformNextJs.d.ts
/**
 * Options for `@tarojs/plugin-platform-nextjs`
 *
 * @see https://github.com/NervJS/tarojs-plugin-ssr
 */
interface PluginPlatformNextJsOptions {
  /**
   * 执行 taro build --type nextjs --watch 命令后，是否需要自动执行 next dev 命令
   * @default true
   */
  runNextjs?: boolean;
  /**
   * 是否启动后自动打开浏览器
   * @default true
   */
  browser?: boolean;
  /**
   * 插件编译阶段需要复制到 Next.js 中的附加文件
   */
  extraFiles?: string[];
}
//#endregion
//#region src/config/plugins/platformAlipayDd.d.ts
/**
 * Options for `@tarojs/plugin-platform-alipay-dd`
 *
 * @see https://github.com/NervJS/taro-plugin-platform-alipay-dd
 */
interface PluginPlatformAlipayDdOptions {}
//#endregion
//#region src/config/plugin.d.ts
interface OfficialPluginOptionsMap {
  '@tarojs/plugin-html': PluginHtmlOptions;
  '@tarojs/plugin-inject': PluginInjectOptions;
  '@tarojs/plugin-http': PluginHttpOptions;
  '@tarojs/plugin-mock': PluginMockOptions;
  '@tarojs/plugin-indie': PluginIndieOptions;
  '@tarojs/plugin-mini-ci': PluginMiniCIOptions;
  /**
   * devtools
   */
  '@tarojs/plugin-react-devtools': PluginReactDevtoolsOptions;
  '@tarojs/plugin-vue-devtools': PluginVueDevtoolsOptions;
  /**
   * platform
   */
  '@tarojs/plugin-platform-xhs': PluginPlatformXhsOptions;
  '@tarojs/plugin-platform-lark': PluginPlatformLarkOptions;
  '@tarojs/plugin-platform-kwai': PluginPlatformKwaiOptions;
  '@tarojs/plugin-platform-alipay-dd': PluginPlatformAlipayDdOptions;
  'tarojs-plugin-platform-nextjs': PluginPlatformNextJsOptions;
}
/**
 * 自定义插件配置
 */
interface CustomPluginOptionsMap {}
type PluginsOptionsMap = CustomPluginOptionsMap & OfficialPluginOptionsMap;
type PluginName = keyof PluginsOptionsMap;
type PluginTuple<T extends PluginName = PluginName> = [T, () => Awaitable<ExcludeEmptyObjects<PluginsOptionsMap>[T]>] | [T, ExcludeEmptyObjects<PluginsOptionsMap>[T]] | [T];
type Plugin = PluginName | PluginTuple;
//#endregion
//#region src/config/preset.d.ts
/**
 * Taro 预设
 *
 * @see https://nervjs.github.io/taro-docs/docs/config-detail#presets
 */
type Preset<T = any> = string | [string, T] | [string];
//#endregion
//#region src/config/index.d.ts
type Framework = LiteralUnion<'none' | 'preact' | 'react' | 'solid' | 'vue3'>;
/**
 * Taro Configuration.
 *
 * @see https://nervjs.github.io/taro-docs/docs/config
 */
interface TaroConfig<T extends CompilerTypes = CompilerWebpackTypes> {
  /**
   * 项目名称
   */
  projectName?: string;
  /**
   * 项目创建日期
   */
  date?: string;
  /**
   * 设计稿尺寸, `v3.4.13` 后支持函数
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#designwidth
   * @default 750
   */
  designWidth?: DesignWidth;
  /**
   * 设计稿尺寸换算规则
   */
  deviceRatio?: DesignRatio;
  /**
   * 项目源码目录
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#sourceroot
   * @default `src`
   */
  sourceRoot?: string;
  /**
   * 项目产出目录
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#outputroot
   * @default `dist`
   */
  outputRoot?: string;
  /**
   * 框架
   */
  framework?: Framework;
  /**
   * 编译工具
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#compiler
   */
  compiler?: Compiler$1<T>;
  /**
   * 全局变量设置
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#defineconstants
   */
  defineConstants?: Record<string, string>;
  /**
   * 目录别名
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#alias
   */
  alias?: Record<string, string>;
  /**
   * 环境变量
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#env
   * @deprecated 建议使用 `.env` 文件
   */
  env?: Record<string, string>;
  /**
   * `Webpack5` 持久化缓存配置
   *
   * @since `Taro v3.5`
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#cache
   */
  cache?: Cache;
  /**
   * 控制 `Taro` 编译日志的输出方式，目前只在 `Webpack5 compiler` 中支持
   *
   * @since `Taro v3.5`
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#logger
   */
  logger?: Logger;
  /**
   * 文件拷贝配置
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#copy
   */
  copy?: Copy;
  /**
   * 用于控制对 `scss` 代码的编译行为
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#sass
   */
  sass?: TaroSassOptions;
  /**
   * Taro 插件配置
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#plugins
   */
  plugins?: Plugin[];
  /**
   * 插件预设集
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#presets
   */
  presets?: Preset[];
  /**
   * JS 压缩工具
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#jsminimizer
   * @default `terser`
   */
  jsMinimizer?: JSMinimizer;
  /**
   * 配置 `terser`
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#terser
   */
  terser?: TerserMinimizer;
  /**
   * 配置 `esbuild`
   *
   * @since `Taro v3.5`
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#esbuild
   */
  esbuild?: EsbuildMinimizer;
  /**
   * CSS 压缩工具
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#cssminimizer
   * @default `csso`
   */
  cssMinimizer?: CSSMinimizer;
  /**
   * 配置 `csso` 工具以压缩 `CSS` 代码
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#csso
   */
  csso?: CSSOMinimizer;
  /**
   * H5 端专用配置
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#h5
   */
  h5?: PlatformH5;
  /**
   * ReactNative 端专用配置
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#rn
   */
  rn?: PlatformRN;
  /**
   * 小程序端专用配置
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#mini
   */
  mini?: PlatformMini;
  /**
   * 鸿蒙端专用配置
   *
   * @see https://nervjs.github.io/taro-docs/docs/config-detail#harmony
   */
  harmony?: PlatformHarmony<T>;
}
//#endregion
//#region src/index.d.ts
interface TaroConfigEnv {
  /**
   * 构建模式
   */
  mode: string;
  /**
   * 构建命令
   */
  command: string;
}
type WebpackMerge = (...configs: (object | null | undefined)[]) => object;
type TaroConfigFnObject<T extends CompilerTypes = CompilerWebpackTypes> = (merge: WebpackMerge, env: TaroConfigEnv) => TaroConfig<T>;
type TaroConfigFnPromise<T extends CompilerTypes = CompilerWebpackTypes> = (merge: WebpackMerge, env: TaroConfigEnv) => Promise<TaroConfig<T>>;
type TaroConfigFn<T extends CompilerTypes = CompilerWebpackTypes> = (merge: WebpackMerge, env: TaroConfigEnv) => TaroConfig<T> | Promise<TaroConfig<T>>;
type TaroConfigExport<T extends CompilerTypes = CompilerWebpackTypes> = TaroConfig<T> | Promise<TaroConfig<T>> | TaroConfigFnObject<T> | TaroConfigFnPromise<T> | TaroConfigFn<T>;
/**
 * Define a Taro config
 *
 * @param config - Taro config
 * @returns Taro config
 */
declare function defineConfig<T extends CompilerTypes = CompilerWebpackTypes>(config: TaroConfig<T>): TaroConfig<T>;
declare function defineConfig<T extends CompilerTypes = CompilerWebpackTypes>(config: Promise<TaroConfig<T>>): Promise<TaroConfig<T>>;
declare function defineConfig<T extends CompilerTypes = CompilerWebpackTypes>(config: TaroConfigFnObject<T>): TaroConfigFnObject<T>;
declare function defineConfig<T extends CompilerTypes = CompilerWebpackTypes>(config: TaroConfigExport<T>): TaroConfigExport<T>;
//#endregion
export { type AutoprefixerOptions, type BasePostCSSOptions, type BaseWebpackConfigOptions, type CSSLoaderExportType, type CSSLoaderImport, type CSSLoaderModulesExportLocalsConvention, type CSSLoaderModulesObject, type CSSLoaderModulesUnion, type CSSLoaderOptions, type CSSLoaderUrl, type CSSMinimizer, type CSSNanoConfig, type CSSNanoOptions, type CSSOMinimizer, type Cache, type CacheBuildDependencies, type ChainableWebpackConfig, type CommonWebpackConfigOptions, type ConfigurablePlugin, type Copy, type CopyIgnore, type CopyOptions, type CopyPattern, type CustomLoader, type CustomPluginOptionsMap, type DartSassDeprecation, type DartSassDeprecationOrId, type DartSassDeprecationStatus, type DartSassDeprecations, type DartSassLoggerWarnOptions, type DartSassOptions, type DartSassVersion, type BuildOptions as ESBuildBuildOptions, type ESBuildPluginOptions, type EsbuildMinimizer, type FilterOptions, type Framework, type HtmlWebpackPluginOptions, type ICompileOptions, type IOutputEnhance, type JSMinimizer, type LessLoaderOptions, type LessOptions, type LessSourceMap, type LoaderAdditionalData, type Logger, type MiniCSSExtractPluginOptions, type NodeSassOptions, type OfficialPluginOptionsMap, type ParseAstType, type PlatformH5, type PlatformH5Router, type PlatformHarmony, type PlatformHarmonyCompileModeSetting, type PlatformHarmonyOhPackage, type PlatformHarmonyRouter, type PlatformMini, type PlatformMiniExperimental, type PlatformMiniMinifyXML, type PlatformMiniOptimizeMainPackage, type PlatformMiniRuntime, type PlatformRN, type PlatformRNNativeComponents, type PlatformRNPostCSSOptions, type PlatformRNResolve, type PlatformUnion, type Plugin, type PluginName, type PluginTuple, type PluginsOptionsMap, type PostCSSOptions, type PostCSSUrlUrl, type PostCSSUrlUrlAsset, type PostCSSUrlUrlDir, type PostcssCssModulesOptions, type PostcssHtmlTransformOptions, type PostcssHtmlTransformPlatform, type PostcssPxtransformOptions, type PostcssUrlHashOptions, type PostcssUrlHashOptionsMethod, type PostcssUrlOptions, type Preset, type RollupOptions, type RollupOutputOptions, type SWCConfig, type SWCOptions, type SassLoaderOptions, type SassLoaderSassOptions, type SourceMapType, type StyleLoaderInjectType, type StyleLoaderOptions, type StylusLoaderOptions, type StylusLoaderStylusOptions, type StylusOptions, type StylusOptionsDefineItem, type StylusOptionsResolveURL, type TaroConfig, TaroConfigEnv, TaroConfigExport, TaroConfigFn, TaroConfigFnObject, TaroConfigFnPromise, type TaroSassOptions, type MinifyOptions$1 as TerserMinifyOptions, type TerserMinimizer, type URLLoaderOptions, type VitePlugin, type ViteServerOptions, type Webpack, type WebpackCompilation, type WebpackCompiler, type WebpackConfiguration, type WebpackDevServerConfiguration, type WebpackLoaderContext, WebpackMerge, defineConfig };