webpack-v5-chain
Version:
2 lines • 22.5 kB
JavaScript
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let c=require("javascript-stringify"),l=require("deepmerge");l=s(l);function u(e){"@babel/helpers - typeof";return u=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},u(e)}function d(e,t){if(u(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(u(r)!=`object`)return r;throw TypeError(`@ must return a primitive value.`)}return(t===`string`?String:Number)(e)}function f(e){var t=d(e,`string`);return u(t)==`symbol`?t:t+``}function p(e,t,n){return(t=f(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m=class{constructor(e){p(this,`parent`,void 0),this.parent=e}batch(e){return e(this),this}end(){return this.parent}},h=class extends m{constructor(e){super(e),p(this,`store`,void 0),p(this,`shorthands`,void 0),this.store=new Map,this.shorthands=[]}extend(e){this.shorthands=e;for(let t of e)this[t]=e=>this.set(t,e);return this}clear(){return this.store.clear(),this}delete(e){return this.store.delete(e),this}order(){let e=[...this.store].reduce((e,[t,n])=>(e[t]=n,e),{}),t=Object.keys(e),n=[...t];for(let r of t){if(!e[r])continue;let{__before:t,__after:i}=e[r];t&&n.includes(t)?(n.splice(n.indexOf(r),1),n.splice(n.indexOf(t),0,r)):i&&n.includes(i)&&(n.splice(n.indexOf(r),1),n.splice(n.indexOf(i)+1,0,r))}return{entries:e,order:n}}entries(){let{entries:e,order:t}=this.order();if(t.length>0)return e}values(){let{entries:e,order:t}=this.order();return t.map(t=>e[t])}get(e){return this.store.get(e)}getOrCompute(e,t){return this.has(e)||this.set(e,t()),this.get(e)}has(e){return this.store.has(e)}set(e,t){return this.store.set(e,t),this}merge(e,t=[]){for(let n of Object.keys(e)){if(t.includes(n))continue;let r=e[n];!Array.isArray(r)&&typeof r!=`object`||r==null||!this.has(n)?this.set(n,r):this.set(n,(0,l.default)(this.get(n),r))}return this}omitEmpty(e){return Object.keys(e).reduce((t,n)=>{let r=e[n];return r===void 0||Array.isArray(r)&&r.length===0||Object.prototype.toString.call(r)===`[object Object]`&&Object.keys(r).length===0||(t[n]=r),t},{})}when(e,t=()=>{},n=()=>{}){return e?t(this):n(this),this}},g=class extends h{},_=class extends m{constructor(e){super(e),p(this,`store`,void 0),this.store=new Set}add(e){return this.store.add(e),this}prepend(e){return this.store=new Set([e,...this.store]),this}clear(){return this.store.clear(),this}delete(e){return this.store.delete(e),this}values(){return[...this.store]}has(e){return this.store.has(e)}merge(e){return this.store=new Set([...this.store,...e]),this}when(e,t=()=>{},n=()=>{}){return e?t(this):n(this),this}},v=class extends _{},y=class extends Function{constructor(){return super(),new Proxy(this,{apply:(e,t,n)=>e.classCall(...n)})}classCall(...e){throw Error(`not implemented`)}},b=class extends y{constructor(e){super(),p(this,`parent`,void 0),p(this,`store`,void 0),p(this,`shorthands`,void 0),p(this,`value`,void 0),p(this,`useMap`,void 0),this.parent=e,this.store=new Map,this.shorthands=[],this.value=void 0,this.useMap=!0}end(){return this.parent}batch(e){return e(this),this}extend(e){this.shorthands=e;for(let t of e)this[t]=e=>this.set(t,e);return this}order(){let e=[...this.store].reduce((e,[t,n])=>(e[t]=n,e),{}),t=Object.keys(e),n=[...t];for(let r of t){if(!e[r])continue;let{__before:t,__after:i}=e[r];t&&n.includes(t)?(n.splice(n.indexOf(r),1),n.splice(n.indexOf(t),0,r)):i&&n.includes(i)&&(n.splice(n.indexOf(r),1),n.splice(n.indexOf(i)+1,0,r))}return{entries:e,order:n}}clear(){return this.value=void 0,this.store.clear(),this}delete(e){return this.store.delete(e),this}has(e){return this.store.has(e)}set(e,t){return this.useMap=!0,this.value=void 0,this.store.set(e,t),this}get(e){return this.store.get(e)}getOrCompute(e,t){return this.has(e)||this.set(e,t()),this.get(e)}classCall(e){return this.clear(),this.useMap=!1,this.value=e,this.parent}entries(){if(this.useMap){let{entries:e,order:t}=this.order();return t.length>0?e:void 0}return this.value}values(){if(this.useMap){let{entries:e,order:t}=this.order();return t.map(t=>e[t])}return this.value}merge(e,t=[]){for(let n of Object.keys(e)){if(t.includes(n))continue;let r=e[n];!Array.isArray(r)&&typeof r!=`object`||r==null||!this.has(n)?this.set(n,r):this.set(n,(0,l.default)(this.get(n),r))}return this}omitEmpty(e){return Object.keys(e).reduce((t,n)=>{let r=e[n];return r===void 0||Array.isArray(r)&&r.length===0||Object.prototype.toString.call(r)===`[object Object]`&&Object.keys(r).length===0||(t[n]=r),t},{})}when(e,t=()=>{},n=()=>{}){return e?t(this):n(this),this}};const x=e=>class extends e{constructor(...e){super(...e),p(this,`__before`,void 0),p(this,`__after`,void 0)}before(e){if(this.__after)throw Error(`Unable to set .before(${JSON.stringify(e)}) with existing value for .after()`);return this.__before=e,this}after(e){if(this.__before)throw Error(`Unable to set .after(${JSON.stringify(e)}) with existing value for .before()`);return this.__after=e,this}merge(e,t=[]){return`before`in e&&this.before(e.before),`after`in e&&this.after(e.after),super.merge(e,[...t,`before`,`after`])}};var S=class extends g{constructor(e){super(e),this.extend([`logging`,`overlay`,`progress`,`reconnect`,`webSocketURL`])}toConfig(){var e;return this.omitEmpty((e=this.entries())==null?{}:e)}};function C(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function w(e,t,n){C(e,t),t.set(e,n)}function T(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function E(e,t,n){return e.set(T(e,t),n),n}function D(e,t){return e.get(T(e,t))}var O=new WeakMap,k=class extends g{constructor(e){super(e),p(this,`allowedHosts`,void 0),p(this,`client`,void 0),w(this,O,!1),this.allowedHosts=new _(this),this.client=new S(this),this.extend([`app`,`bonjour`,`compress`,`devMiddleware`,`headers`,`historyApiFallback`,`host`,`hot`,`ipc`,`liveReload`,`onListening`,`open`,`port`,`proxy`,`server`,`setupExitSignals`,`setupMiddlewares`,`static`,`watchFiles`,`webSocketServer`])}disableClient(){return E(O,this,!0),this}toConfig(){return this.omitEmpty({allowedHosts:this.allowedHosts.values(),client:!D(O,this)&&this.client.toConfig(),...this.entries()})}merge(e,t=[]){return!t.includes(`allowedHosts`)&&`allowedHosts`in e&&this.allowedHosts.merge(e.allowedHosts),!t.includes(`client`)&&`client`in e&&(e.client===!1?E(O,this,!0):typeof e.client==`object`&&e.client!=null&&this.client.merge(e.client)),super.merge(e,[...t,`allowedHosts`,`client`])}},A=class extends g{constructor(e,t,n=`plugin`){super(e),p(this,`name`,void 0),p(this,`type`,void 0),p(this,`__before`,void 0),p(this,`__after`,void 0),this.name=t==null?``:t,this.type=n,this.extend([`init`]),this.set(`init`,(e,t=[])=>typeof e==`function`?new e(...t):e)}use(e,t=[]){return this.set(`plugin`,e).set(`args`,t)}tap(e){var t;if(!this.has(`plugin`))throw Error(`Cannot call .tap() on a plugin that has not yet been defined. Call ${this.type}('${this.name}').use(<Plugin>) first.`);return this.set(`args`,e((t=this.get(`args`))==null?[]:t)),this}set(e,t){if(e===`args`&&!Array.isArray(t))throw Error(`args must be an array of arguments`);return super.set(e,t)}before(e){if(this.__after)throw Error(`Unable to set .before(${JSON.stringify(e)}) with existing value for .after()`);return this.__before=e,this}after(e){if(this.__before)throw Error(`Unable to set .after(${JSON.stringify(e)}) with existing value for .before()`);return this.__after=e,this}merge(e,t=[]){return`before`in e&&this.before(e.before),`after`in e&&this.after(e.after),`plugin`in e&&this.set(`plugin`,e.plugin),`args`in e&&this.set(`args`,e.args),super.merge(e,[...t,`before`,`after`,`args`,`plugin`])}toConfig(){let e=this.get(`init`),t=this.get(`plugin`),n=this.get(`args`),r=null;if(typeof t==`string`&&(r=t,t=require(r)),typeof t!=`object`&&typeof t!=`function`)throw TypeError(`Invalid ${this.type} configuration: ${this.type}('${this.name}').use(<Plugin>) was not called to specify the plugin`);let i=t.__expression?`(${t.__expression})`:t.name,a=e(t,n);return Object.defineProperties(a,{__pluginName:{value:this.name},__pluginType:{value:this.type},__pluginArgs:{value:n},__pluginConstructorName:{value:i},__pluginPath:{value:r}}),a}},j=class extends g{constructor(e){super(e),p(this,`alias`,void 0),p(this,`aliasFields`,void 0),p(this,`byDependency`,void 0),p(this,`conditionNames`,void 0),p(this,`descriptionFiles`,void 0),p(this,`exportsFields`,void 0),p(this,`extensionAlias`,void 0),p(this,`extensions`,void 0),p(this,`fallback`,void 0),p(this,`importsFields`,void 0),p(this,`mainFields`,void 0),p(this,`mainFiles`,void 0),p(this,`modules`,void 0),p(this,`plugins`,void 0),p(this,`restrictions`,void 0),p(this,`roots`,void 0),this.alias=new h(this),this.aliasFields=new _(this),this.byDependency=new h(this),this.conditionNames=new _(this),this.descriptionFiles=new _(this),this.exportsFields=new _(this),this.extensionAlias=new h(this),this.extensions=new _(this),this.fallback=new h(this),this.importsFields=new _(this),this.mainFields=new _(this),this.mainFiles=new _(this),this.modules=new _(this),this.plugins=new h(this),this.restrictions=new _(this),this.roots=new _(this),this.extend([`cache`,`cachePredicate`,`cacheWithContext`,`enforceExtension`,`fullySpecified`,`preferAbsolute`,`preferRelative`,`symlinks`,`tsconfig`,`unsafeCache`,`useSyncFileSystemCalls`])}plugin(e){return this.plugins.getOrCompute(e,()=>new A(this,e,`resolve.plugin`))}toConfig(){var e;return this.omitEmpty(Object.assign((e=this.entries())==null?{}:e,{alias:this.alias.entries(),aliasFields:this.aliasFields.values(),byDependency:this.byDependency.entries(),conditionNames:this.conditionNames.values(),descriptionFiles:this.descriptionFiles.values(),exportsFields:this.exportsFields.values(),extensionAlias:this.extensionAlias.entries(),extensions:this.extensions.values(),fallback:this.fallback.entries(),importsFields:this.importsFields.values(),mainFields:this.mainFields.values(),mainFiles:this.mainFiles.values(),modules:this.modules.values(),plugins:this.plugins.values().map(e=>e.toConfig()),restrictions:this.restrictions.values(),roots:this.roots.values()}))}merge(e,t=[]){let n=[`alias`,`aliasFields`,`byDependency`,`conditionNames`,`descriptionFiles`,`exportsFields`,`extensionAlias`,`extensions`,`importsFields`,`mainFields`,`mainFiles`,`modules`,`restrictions`,`roots`];!t.includes(`plugin`)&&`plugin`in e&&Object.keys(e.plugin).forEach(t=>{this.plugin(t).merge(e.plugin[t])});for(let r of n)!t.includes(r)&&r in e&&this[r].merge(e[r]);return super.merge(e,[...t,...n,`plugin`])}},M=class extends j{},N=class extends g{constructor(e,t){super(e),p(this,`name`,void 0),p(this,`__before`,void 0),p(this,`__after`,void 0),this.name=t==null?``:t,this.extend([`loader`,`options`])}tap(e){return this.options(e(this.get(`options`))),this}before(e){if(this.__after)throw Error(`Unable to set .before(${JSON.stringify(e)}) with existing value for .after()`);return this.__before=e,this}after(e){if(this.__before)throw Error(`Unable to set .after(${JSON.stringify(e)}) with existing value for .before()`);return this.__after=e,this}merge(e,t=[]){var n;return`before`in e&&this.before(e.before),`after`in e&&this.after(e.after),!t.includes(`loader`)&&`loader`in e&&this.loader(e.loader),!t.includes(`options`)&&`options`in e&&this.options((0,l.default)((n=this.store.get(`options`))==null?{}:n,e.options)),super.merge(e,[...t,`before`,`after`,`loader`,`options`])}toConfig(){var e,t,n;let r=this.omitEmpty((e=this.entries())==null?{}:e);return Object.defineProperties(r,{__useName:{value:this.name},__ruleNames:{value:(t=this.parent)==null?void 0:t.names},__ruleTypes:{value:(n=this.parent)==null?void 0:n.ruleTypes}}),r}};const P=e=>Array.isArray(e)?e:[e];var F=class e extends g{constructor(t,n,r=`rule`){super(t),p(this,`ruleName`,void 0),p(this,`names`,void 0),p(this,`ruleType`,void 0),p(this,`ruleTypes`,void 0),p(this,`uses`,void 0),p(this,`include`,void 0),p(this,`exclude`,void 0),p(this,`rules`,void 0),p(this,`oneOfs`,void 0),p(this,`resolve`,void 0),p(this,`__before`,void 0),p(this,`__after`,void 0),this.ruleName=n==null?``:n,this.names=[],this.ruleType=r,this.ruleTypes=[];let i=this;for(;i instanceof e;)this.names.unshift(i.ruleName),this.ruleTypes.unshift(i.ruleType),i=i.parent;this.uses=new h(this),this.include=new _(this),this.exclude=new _(this),this.rules=new h(this),this.oneOfs=new h(this),this.resolve=new M(this),this.resolve.extend([`fullySpecified`]),this.extend([`assert`,`compiler`,`dependency`,`descriptionData`,`enforce`,`issuer`,`issuerLayer`,`layer`,`loader`,`extractSourceMap`,`mimetype`,`options`,`parser`,`generator`,`phase`,`realResource`,`resource`,`resourceFragment`,`resourceQuery`,`scheme`,`sideEffects`,`test`,`type`,`with`])}before(e){if(this.__after)throw Error(`Unable to set .before(${JSON.stringify(e)}) with existing value for .after()`);return this.__before=e,this}after(e){if(this.__before)throw Error(`Unable to set .after(${JSON.stringify(e)}) with existing value for .before()`);return this.__after=e,this}use(e){return this.uses.getOrCompute(e,()=>new N(this,e))}rule(t){return this.rules.getOrCompute(t,()=>new e(this,t,`rule`))}oneOf(t){return this.oneOfs.getOrCompute(t,()=>new e(this,t,`oneOf`))}pre(){return this.enforce(`pre`)}post(){return this.enforce(`post`)}toConfig(){var e;let t=this.omitEmpty(Object.assign((e=this.entries())==null?{}:e,{include:this.include.values(),exclude:this.exclude.values(),rules:this.rules.values().map(e=>e.toConfig()),oneOf:this.oneOfs.values().map(e=>e.toConfig()),use:this.uses.values().map(e=>e.toConfig()),resolve:this.resolve.toConfig()}));return Object.defineProperties(t,{__ruleNames:{value:this.names},__ruleTypes:{value:this.ruleTypes}}),t}merge(e,t=[]){return`before`in e&&this.before(e.before),`after`in e&&this.after(e.after),!t.includes(`include`)&&`include`in e&&this.include.merge(P(e.include)),!t.includes(`exclude`)&&`exclude`in e&&this.exclude.merge(P(e.exclude)),!t.includes(`use`)&&`use`in e&&Object.keys(e.use).forEach(t=>{this.use(t).merge(e.use[t])}),!t.includes(`rules`)&&`rules`in e&&Object.keys(e.rules).forEach(t=>{this.rule(t).merge(e.rules[t])}),!t.includes(`oneOf`)&&`oneOf`in e&&Object.keys(e.oneOf).forEach(t=>{this.oneOf(t).merge(e.oneOf[t])}),!t.includes(`resolve`)&&`resolve`in e&&this.resolve.merge(e.resolve),!t.includes(`test`)&&`test`in e&&this.test(e.test instanceof RegExp||typeof e.test==`function`?e.test:new RegExp(e.test,`u`)),super.merge(e,[...t,`before`,`after`,`include`,`exclude`,`use`,`rules`,`oneOf`,`resolve`,`test`])}},I=class extends g{constructor(e){super(e),p(this,`rules`,void 0),p(this,`defaultRules`,void 0),p(this,`generator`,void 0),p(this,`parser`,void 0),this.rules=new h(this),this.defaultRules=new h(this),this.generator=new g(this),this.parser=new g(this),this.extend([`noParse`,`unsafeCache`,`exprContextCritical`,`exprContextRecursive`,`exprContextRegExp`,`exprContextRequest`,`unknownContextCritical`,`unknownContextRecursive`,`unknownContextRegExp`,`unknownContextRequest`,`wrappedContextCritical`,`wrappedContextRecursive`,`wrappedContextRegExp`,`strictExportPresence`,`strictThisContextOnImports`])}defaultRule(e){return this.defaultRules.getOrCompute(e,()=>new F(this,e,`defaultRule`))}rule(e){return this.rules.getOrCompute(e,()=>new F(this,e,`rule`))}toConfig(){var e;return this.omitEmpty(Object.assign((e=this.entries())==null?{}:e,{defaultRules:this.defaultRules.values().map(e=>e.toConfig()),generator:this.generator.entries(),parser:this.parser.entries(),rules:this.rules.values().map(e=>e.toConfig())}))}merge(e,t=[]){return!t.includes(`rule`)&&`rule`in e&&Object.keys(e.rule).forEach(t=>{this.rule(t).merge(e.rule[t])}),!t.includes(`defaultRule`)&&`defaultRule`in e&&Object.keys(e.defaultRule).forEach(t=>{this.defaultRule(t).merge(e.defaultRule[t])}),super.merge(e,[...t,`rule`,`defaultRule`])}},L=class extends g{constructor(e){super(e),p(this,`minimizers`,void 0),p(this,`splitChunks`,void 0),this.minimizers=new h(this),this.splitChunks=new b(this),this.extend([`checkWasmTypes`,`chunkIds`,`concatenateModules`,`emitOnErrors`,`avoidEntryIife`,`flagIncludedChunks`,`inlineExports`,`innerGraph`,`mangleExports`,`mangleWasmImports`,`mergeDuplicateChunks`,`minimize`,`moduleIds`,`nodeEnv`,`portableRecords`,`providedExports`,`realContentHash`,`removeAvailableModules`,`removeEmptyChunks`,`runtimeChunk`,`sideEffects`,`usedExports`])}minimizer(e){return this.minimizers.getOrCompute(e,()=>new A(this,e,`optimization.minimizer`))}toConfig(){var e;return this.omitEmpty(Object.assign((e=this.entries())==null?{}:e,{splitChunks:this.splitChunks.entries(),minimizer:this.minimizers.values().map(e=>e.toConfig())}))}merge(e,t=[]){if(!t.includes(`minimizer`)&&`minimizer`in e&&Object.keys(e.minimizer).forEach(t=>{this.minimizer(t).merge(e.minimizer[t])}),!t.includes(`splitChunks`)&&`splitChunks`in e){let{splitChunks:t}=e;t===!1?this.splitChunks(!1):typeof t==`object`&&t&&this.splitChunks.merge(t)}return super.merge(e,[...t,`minimizer`,`splitChunks`])}},R=class extends g{constructor(e){super(e),this.extend(`assetModuleFilename.asyncChunks.auxiliaryComment.charset.chunkFilename.chunkFormat.chunkLoadTimeout.chunkLoadingGlobal.chunkLoading.clean.compareBeforeEmit.crossOriginLoading.cssChunkFilename.cssFilename.devtoolFallbackModuleFilenameTemplate.devtoolModuleFilenameTemplate.devtoolNamespace.enabledChunkLoadingTypes.enabledLibraryTypes.enabledWasmLoadingTypes.environment.filename.globalObject.hashDigest.hashDigestLength.hashFunction.hashSalt.hotUpdateChunkFilename.hotUpdateGlobal.hotUpdateMainFilename.html.htmlChunkFilename.htmlFilename.iife.ignoreBrowserWarnings.importFunctionName.importMetaName.library.libraryExport.libraryTarget.module.path.pathinfo.publicPath.scriptType.sourceMapFilename.sourcePrefix.strictModuleErrorHandling.strictModuleExceptionHandling.strictModuleResolution.trustedTypes.umdNamedDefine.uniqueName.wasmLoading.webassemblyModuleFilename.workerChunkFilename.workerChunkLoading.workerPublicPath.workerWasmLoading`.split(`.`))}},z=class extends b{constructor(e){super(e),this.extend([`assetFilter`,`hints`,`maxAssetSize`,`maxEntrypointSize`])}},B=class extends j{constructor(e){super(e),p(this,`moduleExtensions`,void 0),p(this,`packageMains`,void 0),this.extensions=new _(this),this.mainFields=new _(this),this.modules=new _(this),this.moduleExtensions=new _(this),this.packageMains=new _(this)}toConfig(){return this.omitEmpty({...super.toConfig(),moduleExtensions:this.moduleExtensions.values(),packageMains:this.packageMains.values()})}merge(e,t=[]){let n=[`extensions`,`mainFields`,`modules`,`moduleExtensions`,`packageMains`];for(let r of n)!t.includes(r)&&r in e&&this[r].merge(e[r]);return super.merge(e,[...t,...n])}},V=class extends _{},H=class extends h{},U=class e extends g{constructor(){super(),p(this,`entryPoints`,void 0),p(this,`output`,void 0),p(this,`module`,void 0),p(this,`optimization`,void 0),p(this,`performance`,void 0),p(this,`plugins`,void 0),p(this,`resolve`,void 0),p(this,`resolveLoader`,void 0),p(this,`devServer`,void 0),this.entryPoints=new h(this),this.output=new R(this),this.module=new I(this),this.resolve=new j(this),this.resolveLoader=new B(this),this.optimization=new L(this),this.plugins=new h(this),this.devServer=new k(this),this.performance=new z(this),this.extend(`context.mode.cache.devtool.target.watch.watchOptions.externals.externalsType.externalsPresets.dotenv.node.stats.experiments.infrastructureLogging.amd.bail.dependencies.ignoreWarnings.loader.name.parallelism.profile.recordsInputPath.recordsOutputPath.recordsPath.snapshot`.split(`.`))}static toString(e,{verbose:t=!1,configPrefix:n=`config`}={}){return(0,c.stringify)(e,(e,r,i)=>{if(e!=null&&e.__pluginName){var a;let t=e,r=`/* ${n}.${t.__pluginType}('${t.__pluginName}') */\n`,s=t.__pluginPath?`(require(${i(t.__pluginPath)}))`:t.__pluginConstructorName;if(s){var o;return`${r}new ${s}(${(o=i(t.__pluginArgs))==null?void 0:o.slice(1,-1)})`}return r+i((a=t.__pluginArgs)!=null&&a.length?{args:t.__pluginArgs}:{})}if(e!=null&&e.__ruleNames){let t=e,r=t.__ruleTypes;return`/* ${n}.module${t.__ruleNames.map((e,t)=>`.${r?r[t]:`rule`}('${e}')`).join(``)}${t.__useName?`.use('${t.__useName}')`:``} */\n`+i(e)}return e!=null&&e.__expression?e.__expression:typeof e==`function`&&!t&&e.toString().length>100?`function () { /* omitted long function */ }`:i(e)},2)}entry(e){return this.entryPoints.getOrCompute(e,()=>new V(this))}plugin(e){return this.plugins.getOrCompute(e,()=>new A(this,e))}toConfig(){var e,t;let n=(e=this.entryPoints.entries())==null?{}:e,r=(t=this.entries())==null?{}:t,i=Object.fromEntries(Object.entries(n).map(([e,t])=>[e,t.values()]));return this.omitEmpty(Object.assign(r,{output:this.output.entries(),resolve:this.resolve.toConfig(),resolveLoader:this.resolveLoader.toConfig(),devServer:this.devServer.toConfig(),module:this.module.toConfig(),optimization:this.optimization.toConfig(),plugins:this.plugins.values().map(e=>e.toConfig()),performance:this.performance.entries(),entry:i}))}toString(t){return e.toString(this.toConfig(),t)}merge(e={},t=[]){let n=[`output`,`resolve`,`resolveLoader`,`devServer`,`optimization`,`performance`,`module`];!t.includes(`entry`)&&`entry`in e&&Object.keys(e.entry).forEach(t=>{this.entry(t).merge([].concat(e.entry[t]))}),!t.includes(`plugin`)&&`plugin`in e&&Object.keys(e.plugin).forEach(t=>{this.plugin(t).merge(e.plugin[t])});for(let r of n)!t.includes(r)&&r in e&&this[r].merge(e[r]);return super.merge(e,[...t,...n,`entry`,`plugin`])}};exports.Chainable=m,exports.Chained=m,exports.ChainedMap=g,exports.ChainedSet=v,exports.ChainedValueMap=b,exports.Config=U,exports.EntryPoint=V,exports.Plugins=H,exports.TypedChainedMap=h,exports.TypedChainedSet=_,exports.createOrderable=x;
//# sourceMappingURL=index.js.map