Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

WebpackOptions.json 69KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247
  1. {
  2. "definitions": {
  3. "ArrayOfStringOrStringArrayValues": {
  4. "type": "array",
  5. "items": {
  6. "description": "string or array of strings",
  7. "anyOf": [
  8. {
  9. "type": "string",
  10. "minLength": 1
  11. },
  12. {
  13. "type": "array",
  14. "items": {
  15. "description": "A non-empty string",
  16. "type": "string",
  17. "minLength": 1
  18. }
  19. }
  20. ]
  21. }
  22. },
  23. "ArrayOfStringValues": {
  24. "type": "array",
  25. "items": {
  26. "description": "A non-empty string",
  27. "type": "string",
  28. "minLength": 1
  29. }
  30. },
  31. "Entry": {
  32. "anyOf": [
  33. {
  34. "$ref": "#/definitions/EntryDynamic"
  35. },
  36. {
  37. "$ref": "#/definitions/EntryStatic"
  38. }
  39. ]
  40. },
  41. "EntryDynamic": {
  42. "description": "A Function returning an entry object, an entry string, an entry array or a promise to these things.",
  43. "instanceof": "Function",
  44. "tsType": "(() => EntryStatic | Promise<EntryStatic>)"
  45. },
  46. "EntryItem": {
  47. "oneOf": [
  48. {
  49. "description": "An entry point without name. The string is resolved to a module which is loaded upon startup.",
  50. "type": "string",
  51. "minLength": 1
  52. },
  53. {
  54. "description": "An entry point without name. All modules are loaded upon startup. The last one is exported.",
  55. "anyOf": [
  56. {
  57. "$ref": "#/definitions/NonEmptyArrayOfUniqueStringValues"
  58. }
  59. ]
  60. }
  61. ]
  62. },
  63. "EntryObject": {
  64. "description": "Multiple entry bundles are created. The key is the chunk name. The value can be a string or an array.",
  65. "type": "object",
  66. "additionalProperties": {
  67. "description": "An entry point with name",
  68. "oneOf": [
  69. {
  70. "description": "The string is resolved to a module which is loaded upon startup.",
  71. "type": "string",
  72. "minLength": 1
  73. },
  74. {
  75. "description": "All modules are loaded upon startup. The last one is exported.",
  76. "anyOf": [
  77. {
  78. "$ref": "#/definitions/NonEmptyArrayOfUniqueStringValues"
  79. }
  80. ]
  81. }
  82. ]
  83. },
  84. "minProperties": 1
  85. },
  86. "EntryStatic": {
  87. "oneOf": [
  88. {
  89. "$ref": "#/definitions/EntryObject"
  90. },
  91. {
  92. "$ref": "#/definitions/EntryItem"
  93. }
  94. ]
  95. },
  96. "ExternalItem": {
  97. "anyOf": [
  98. {
  99. "description": "An exact matched dependency becomes external. The same string is used as external dependency.",
  100. "type": "string"
  101. },
  102. {
  103. "description": "If an dependency matches exactly a property of the object, the property value is used as dependency.",
  104. "type": "object",
  105. "additionalProperties": {
  106. "description": "The dependency used for the external",
  107. "anyOf": [
  108. {
  109. "type": "string"
  110. },
  111. {
  112. "type": "object"
  113. },
  114. {
  115. "$ref": "#/definitions/ArrayOfStringValues"
  116. },
  117. {
  118. "type": "boolean"
  119. }
  120. ]
  121. }
  122. },
  123. {
  124. "description": "Every matched dependency becomes external.",
  125. "instanceof": "RegExp",
  126. "tsType": "RegExp"
  127. }
  128. ]
  129. },
  130. "Externals": {
  131. "anyOf": [
  132. {
  133. "description": "`function(context, request, callback(err, result))` The function is called on each dependency.",
  134. "instanceof": "Function",
  135. "tsType": "((context: string, request: string, callback: (err?: Error, result?: string) => void) => void)"
  136. },
  137. {
  138. "$ref": "#/definitions/ExternalItem"
  139. },
  140. {
  141. "type": "array",
  142. "items": {
  143. "description": "External configuration",
  144. "anyOf": [
  145. {
  146. "description": "`function(context, request, callback(err, result))` The function is called on each dependency.",
  147. "instanceof": "Function",
  148. "tsType": "((context: string, request: string, callback: (err?: Error, result?: string) => void) => void)"
  149. },
  150. {
  151. "$ref": "#/definitions/ExternalItem"
  152. }
  153. ]
  154. }
  155. }
  156. ]
  157. },
  158. "FilterItemTypes": {
  159. "anyOf": [
  160. {
  161. "instanceof": "RegExp",
  162. "tsType": "RegExp"
  163. },
  164. {
  165. "type": "string"
  166. },
  167. {
  168. "instanceof": "Function",
  169. "tsType": "((value: string) => boolean)"
  170. }
  171. ]
  172. },
  173. "FilterTypes": {
  174. "anyOf": [
  175. {
  176. "$ref": "#/definitions/FilterItemTypes"
  177. },
  178. {
  179. "type": "array",
  180. "items": {
  181. "description": "Rule to filter",
  182. "anyOf": [
  183. {
  184. "$ref": "#/definitions/FilterItemTypes"
  185. }
  186. ]
  187. }
  188. }
  189. ]
  190. },
  191. "LibraryCustomUmdObject": {
  192. "type": "object",
  193. "additionalProperties": false,
  194. "properties": {
  195. "amd": {
  196. "description": "Name of the exposed AMD library in the UMD",
  197. "type": "string"
  198. },
  199. "commonjs": {
  200. "description": "Name of the exposed commonjs export in the UMD",
  201. "type": "string"
  202. },
  203. "root": {
  204. "description": "Name of the property exposed globally by a UMD library",
  205. "anyOf": [
  206. {
  207. "type": "string"
  208. },
  209. {
  210. "$ref": "#/definitions/ArrayOfStringValues"
  211. }
  212. ]
  213. }
  214. }
  215. },
  216. "ModuleOptions": {
  217. "type": "object",
  218. "additionalProperties": false,
  219. "properties": {
  220. "defaultRules": {
  221. "description": "An array of rules applied by default for modules.",
  222. "anyOf": [
  223. {
  224. "$ref": "#/definitions/RuleSetRules"
  225. }
  226. ]
  227. },
  228. "exprContextCritical": {
  229. "description": "Enable warnings for full dynamic dependencies",
  230. "type": "boolean"
  231. },
  232. "exprContextRecursive": {
  233. "description": "Enable recursive directory lookup for full dynamic dependencies",
  234. "type": "boolean"
  235. },
  236. "exprContextRegExp": {
  237. "description": "Sets the default regular expression for full dynamic dependencies",
  238. "anyOf": [
  239. {
  240. "type": "boolean"
  241. },
  242. {
  243. "instanceof": "RegExp",
  244. "tsType": "RegExp"
  245. }
  246. ]
  247. },
  248. "exprContextRequest": {
  249. "description": "Set the default request for full dynamic dependencies",
  250. "type": "string"
  251. },
  252. "noParse": {
  253. "description": "Don't parse files matching. It's matched against the full resolved request.",
  254. "anyOf": [
  255. {
  256. "type": "array",
  257. "items": {
  258. "description": "A regular expression, when matched the module is not parsed",
  259. "instanceof": "RegExp",
  260. "tsType": "RegExp"
  261. },
  262. "minItems": 1
  263. },
  264. {
  265. "instanceof": "RegExp",
  266. "tsType": "RegExp"
  267. },
  268. {
  269. "instanceof": "Function",
  270. "tsType": "Function"
  271. },
  272. {
  273. "type": "array",
  274. "items": {
  275. "description": "An absolute path, when the module starts with this path it is not parsed",
  276. "type": "string",
  277. "absolutePath": true
  278. },
  279. "minItems": 1
  280. },
  281. {
  282. "type": "string",
  283. "absolutePath": true
  284. }
  285. ]
  286. },
  287. "rules": {
  288. "description": "An array of rules applied for modules.",
  289. "anyOf": [
  290. {
  291. "$ref": "#/definitions/RuleSetRules"
  292. }
  293. ]
  294. },
  295. "strictExportPresence": {
  296. "description": "Emit errors instead of warnings when imported names don't exist in imported module",
  297. "type": "boolean"
  298. },
  299. "strictThisContextOnImports": {
  300. "description": "Handle the this context correctly according to the spec for namespace objects",
  301. "type": "boolean"
  302. },
  303. "unknownContextCritical": {
  304. "description": "Enable warnings when using the require function in a not statically analyse-able way",
  305. "type": "boolean"
  306. },
  307. "unknownContextRecursive": {
  308. "description": "Enable recursive directory lookup when using the require function in a not statically analyse-able way",
  309. "type": "boolean"
  310. },
  311. "unknownContextRegExp": {
  312. "description": "Sets the regular expression when using the require function in a not statically analyse-able way",
  313. "anyOf": [
  314. {
  315. "type": "boolean"
  316. },
  317. {
  318. "instanceof": "RegExp",
  319. "tsType": "RegExp"
  320. }
  321. ]
  322. },
  323. "unknownContextRequest": {
  324. "description": "Sets the request when using the require function in a not statically analyse-able way",
  325. "type": "string"
  326. },
  327. "unsafeCache": {
  328. "description": "Cache the resolving of module requests",
  329. "anyOf": [
  330. {
  331. "type": "boolean"
  332. },
  333. {
  334. "instanceof": "Function",
  335. "tsType": "Function"
  336. }
  337. ]
  338. },
  339. "wrappedContextCritical": {
  340. "description": "Enable warnings for partial dynamic dependencies",
  341. "type": "boolean"
  342. },
  343. "wrappedContextRecursive": {
  344. "description": "Enable recursive directory lookup for partial dynamic dependencies",
  345. "type": "boolean"
  346. },
  347. "wrappedContextRegExp": {
  348. "description": "Set the inner regular expression for partial dynamic dependencies",
  349. "instanceof": "RegExp",
  350. "tsType": "RegExp"
  351. }
  352. }
  353. },
  354. "NodeOptions": {
  355. "type": "object",
  356. "additionalProperties": {
  357. "description": "Include a polyfill for the node.js module",
  358. "enum": [false, true, "mock", "empty"]
  359. },
  360. "properties": {
  361. "Buffer": {
  362. "description": "Include a polyfill for the 'Buffer' variable",
  363. "enum": [false, true, "mock"]
  364. },
  365. "__dirname": {
  366. "description": "Include a polyfill for the '__dirname' variable",
  367. "enum": [false, true, "mock"]
  368. },
  369. "__filename": {
  370. "description": "Include a polyfill for the '__filename' variable",
  371. "enum": [false, true, "mock"]
  372. },
  373. "console": {
  374. "description": "Include a polyfill for the 'console' variable",
  375. "enum": [false, true, "mock"]
  376. },
  377. "global": {
  378. "description": "Include a polyfill for the 'global' variable",
  379. "type": "boolean"
  380. },
  381. "process": {
  382. "description": "Include a polyfill for the 'process' variable",
  383. "enum": [false, true, "mock"]
  384. }
  385. }
  386. },
  387. "NonEmptyArrayOfUniqueStringValues": {
  388. "description": "A non-empty array of non-empty strings",
  389. "type": "array",
  390. "items": {
  391. "description": "A non-empty string",
  392. "type": "string",
  393. "minLength": 1
  394. },
  395. "minItems": 1,
  396. "uniqueItems": true
  397. },
  398. "OptimizationOptions": {
  399. "description": "Enables/Disables integrated optimizations",
  400. "type": "object",
  401. "additionalProperties": false,
  402. "properties": {
  403. "checkWasmTypes": {
  404. "description": "Check for incompatible wasm types when importing/exporting from/to ESM",
  405. "type": "boolean"
  406. },
  407. "chunkIds": {
  408. "description": "Define the algorithm to choose chunk ids (named: readable ids for better debugging, size: numeric ids focused on minimal initial download size, total-size: numeric ids focused on minimal total download size, false: no algorithm used, as custom one can be provided via plugin)",
  409. "enum": ["natural", "named", "size", "total-size", false]
  410. },
  411. "concatenateModules": {
  412. "description": "Concatenate modules when possible to generate less modules, more efficient code and enable more optimizations by the minimizer",
  413. "type": "boolean"
  414. },
  415. "flagIncludedChunks": {
  416. "description": "Also flag chunks as loaded which contain a subset of the modules",
  417. "type": "boolean"
  418. },
  419. "hashedModuleIds": {
  420. "description": "Use hashed module id instead module identifiers for better long term caching (deprecated, used moduleIds: hashed instead)",
  421. "type": "boolean"
  422. },
  423. "mangleWasmImports": {
  424. "description": "Reduce size of WASM by changing imports to shorter strings.",
  425. "type": "boolean"
  426. },
  427. "mergeDuplicateChunks": {
  428. "description": "Merge chunks which contain the same modules",
  429. "type": "boolean"
  430. },
  431. "minimize": {
  432. "description": "Enable minimizing the output. Uses optimization.minimizer.",
  433. "type": "boolean"
  434. },
  435. "minimizer": {
  436. "description": "Minimizer(s) to use for minimizing the output",
  437. "type": "array",
  438. "items": {
  439. "description": "Plugin of type object or instanceof Function",
  440. "anyOf": [
  441. {
  442. "$ref": "#/definitions/WebpackPluginInstance"
  443. },
  444. {
  445. "$ref": "#/definitions/WebpackPluginFunction"
  446. }
  447. ]
  448. }
  449. },
  450. "moduleIds": {
  451. "description": "Define the algorithm to choose module ids (natural: numeric ids in order of usage, named: readable ids for better debugging, hashed: short hashes as ids for better long term caching, size: numeric ids focused on minimal initial download size, total-size: numeric ids focused on minimal total download size, false: no algorithm used, as custom one can be provided via plugin)",
  452. "enum": ["natural", "named", "hashed", "size", "total-size", false]
  453. },
  454. "namedChunks": {
  455. "description": "Use readable chunk identifiers for better debugging (deprecated, used chunkIds: named instead)",
  456. "type": "boolean"
  457. },
  458. "namedModules": {
  459. "description": "Use readable module identifiers for better debugging (deprecated, used moduleIds: named instead)",
  460. "type": "boolean"
  461. },
  462. "noEmitOnErrors": {
  463. "description": "Avoid emitting assets when errors occur",
  464. "type": "boolean"
  465. },
  466. "nodeEnv": {
  467. "description": "Set process.env.NODE_ENV to a specific value",
  468. "anyOf": [
  469. {
  470. "enum": [false]
  471. },
  472. {
  473. "type": "string"
  474. }
  475. ]
  476. },
  477. "occurrenceOrder": {
  478. "description": "Figure out a order of modules which results in the smallest initial bundle",
  479. "type": "boolean"
  480. },
  481. "portableRecords": {
  482. "description": "Generate records with relative paths to be able to move the context folder",
  483. "type": "boolean"
  484. },
  485. "providedExports": {
  486. "description": "Figure out which exports are provided by modules to generate more efficient code",
  487. "type": "boolean"
  488. },
  489. "removeAvailableModules": {
  490. "description": "Removes modules from chunks when these modules are already included in all parents",
  491. "type": "boolean"
  492. },
  493. "removeEmptyChunks": {
  494. "description": "Remove chunks which are empty",
  495. "type": "boolean"
  496. },
  497. "runtimeChunk": {
  498. "description": "Create an additional chunk which contains only the webpack runtime and chunk hash maps",
  499. "oneOf": [
  500. {
  501. "type": "boolean"
  502. },
  503. {
  504. "enum": ["single", "multiple"]
  505. },
  506. {
  507. "type": "object",
  508. "additionalProperties": false,
  509. "properties": {
  510. "name": {
  511. "description": "The name or name factory for the runtime chunks",
  512. "oneOf": [
  513. {
  514. "type": "string"
  515. },
  516. {
  517. "instanceof": "Function",
  518. "tsType": "Function"
  519. }
  520. ]
  521. }
  522. }
  523. }
  524. ]
  525. },
  526. "sideEffects": {
  527. "description": "Skip over modules which are flagged to contain no side effects when exports are not used",
  528. "type": "boolean"
  529. },
  530. "splitChunks": {
  531. "description": "Optimize duplication and caching by splitting chunks by shared modules and cache group",
  532. "oneOf": [
  533. {
  534. "enum": [false]
  535. },
  536. {
  537. "$ref": "#/definitions/OptimizationSplitChunksOptions"
  538. }
  539. ]
  540. },
  541. "usedExports": {
  542. "description": "Figure out which exports are used by modules to mangle export names, omit unused exports and generate more efficient code",
  543. "type": "boolean"
  544. }
  545. }
  546. },
  547. "OptimizationSplitChunksOptions": {
  548. "type": "object",
  549. "additionalProperties": false,
  550. "properties": {
  551. "automaticNameDelimiter": {
  552. "description": "Sets the name delimiter for created chunks",
  553. "type": "string",
  554. "minLength": 1
  555. },
  556. "automaticNameMaxLength": {
  557. "description": "Sets the max length for the name of a created chunk",
  558. "type": "number",
  559. "minimum": 1
  560. },
  561. "cacheGroups": {
  562. "description": "Assign modules to a cache group (modules from different cache groups are tried to keep in separate chunks)",
  563. "type": "object",
  564. "additionalProperties": {
  565. "description": "Configuration for a cache group",
  566. "anyOf": [
  567. {
  568. "enum": [false]
  569. },
  570. {
  571. "instanceof": "Function",
  572. "tsType": "Function"
  573. },
  574. {
  575. "type": "string"
  576. },
  577. {
  578. "instanceof": "RegExp",
  579. "tsType": "RegExp"
  580. },
  581. {
  582. "type": "object",
  583. "additionalProperties": false,
  584. "properties": {
  585. "automaticNameDelimiter": {
  586. "description": "Sets the name delimiter for created chunks",
  587. "type": "string",
  588. "minLength": 1
  589. },
  590. "automaticNameMaxLength": {
  591. "description": "Sets the max length for the name of a created chunk",
  592. "type": "number",
  593. "minimum": 1
  594. },
  595. "automaticNamePrefix": {
  596. "description": "Sets the name prefix for created chunks",
  597. "type": "string"
  598. },
  599. "chunks": {
  600. "description": "Select chunks for determining cache group content (defaults to \"initial\", \"initial\" and \"all\" requires adding these chunks to the HTML)",
  601. "oneOf": [
  602. {
  603. "enum": ["initial", "async", "all"]
  604. },
  605. {
  606. "instanceof": "Function",
  607. "tsType": "Function"
  608. }
  609. ]
  610. },
  611. "enforce": {
  612. "description": "Ignore minimum size, minimum chunks and maximum requests and always create chunks for this cache group",
  613. "type": "boolean"
  614. },
  615. "filename": {
  616. "description": "Sets the template for the filename for created chunks (Only works for initial chunks)",
  617. "type": "string",
  618. "minLength": 1
  619. },
  620. "maxAsyncRequests": {
  621. "description": "Maximum number of requests which are accepted for on-demand loading",
  622. "type": "number",
  623. "minimum": 1
  624. },
  625. "maxInitialRequests": {
  626. "description": "Maximum number of initial chunks which are accepted for an entry point",
  627. "type": "number",
  628. "minimum": 1
  629. },
  630. "maxSize": {
  631. "description": "Maximal size hint for the created chunks",
  632. "type": "number",
  633. "minimum": 0
  634. },
  635. "minChunks": {
  636. "description": "Minimum number of times a module has to be duplicated until it's considered for splitting",
  637. "type": "number",
  638. "minimum": 1
  639. },
  640. "minSize": {
  641. "description": "Minimal size for the created chunk",
  642. "type": "number",
  643. "minimum": 0
  644. },
  645. "name": {
  646. "description": "Give chunks for this cache group a name (chunks with equal name are merged)",
  647. "oneOf": [
  648. {
  649. "type": "boolean"
  650. },
  651. {
  652. "instanceof": "Function",
  653. "tsType": "Function"
  654. },
  655. {
  656. "type": "string"
  657. }
  658. ]
  659. },
  660. "priority": {
  661. "description": "Priority of this cache group",
  662. "type": "number"
  663. },
  664. "reuseExistingChunk": {
  665. "description": "Try to reuse existing chunk (with name) when it has matching modules",
  666. "type": "boolean"
  667. },
  668. "test": {
  669. "description": "Assign modules to a cache group",
  670. "oneOf": [
  671. {
  672. "instanceof": "Function",
  673. "tsType": "Function"
  674. },
  675. {
  676. "type": "string"
  677. },
  678. {
  679. "instanceof": "RegExp",
  680. "tsType": "RegExp"
  681. }
  682. ]
  683. }
  684. }
  685. }
  686. ]
  687. }
  688. },
  689. "chunks": {
  690. "description": "Select chunks for determining shared modules (defaults to \"async\", \"initial\" and \"all\" requires adding these chunks to the HTML)",
  691. "oneOf": [
  692. {
  693. "enum": ["initial", "async", "all"]
  694. },
  695. {
  696. "instanceof": "Function",
  697. "tsType": "Function"
  698. }
  699. ]
  700. },
  701. "fallbackCacheGroup": {
  702. "description": "Options for modules not selected by any other cache group",
  703. "type": "object",
  704. "additionalProperties": false,
  705. "properties": {
  706. "automaticNameDelimiter": {
  707. "description": "Sets the name delimiter for created chunks",
  708. "type": "string",
  709. "minLength": 1
  710. },
  711. "maxSize": {
  712. "description": "Maximal size hint for the created chunks",
  713. "type": "number",
  714. "minimum": 0
  715. },
  716. "minSize": {
  717. "description": "Minimal size for the created chunk",
  718. "type": "number",
  719. "minimum": 0
  720. }
  721. }
  722. },
  723. "filename": {
  724. "description": "Sets the template for the filename for created chunks (Only works for initial chunks)",
  725. "type": "string",
  726. "minLength": 1
  727. },
  728. "hidePathInfo": {
  729. "description": "Prevents exposing path info when creating names for parts splitted by maxSize",
  730. "type": "boolean"
  731. },
  732. "maxAsyncRequests": {
  733. "description": "Maximum number of requests which are accepted for on-demand loading",
  734. "type": "number",
  735. "minimum": 1
  736. },
  737. "maxInitialRequests": {
  738. "description": "Maximum number of initial chunks which are accepted for an entry point",
  739. "type": "number",
  740. "minimum": 1
  741. },
  742. "maxSize": {
  743. "description": "Maximal size hint for the created chunks",
  744. "type": "number",
  745. "minimum": 0
  746. },
  747. "minChunks": {
  748. "description": "Minimum number of times a module has to be duplicated until it's considered for splitting",
  749. "type": "number",
  750. "minimum": 1
  751. },
  752. "minSize": {
  753. "description": "Minimal size for the created chunks",
  754. "type": "number",
  755. "minimum": 0
  756. },
  757. "name": {
  758. "description": "Give chunks created a name (chunks with equal name are merged)",
  759. "oneOf": [
  760. {
  761. "type": "boolean"
  762. },
  763. {
  764. "instanceof": "Function",
  765. "tsType": "Function"
  766. },
  767. {
  768. "type": "string"
  769. }
  770. ]
  771. }
  772. }
  773. },
  774. "OutputOptions": {
  775. "type": "object",
  776. "additionalProperties": false,
  777. "properties": {
  778. "auxiliaryComment": {
  779. "description": "Add a comment in the UMD wrapper.",
  780. "anyOf": [
  781. {
  782. "description": "Append the same comment above each import style.",
  783. "type": "string"
  784. },
  785. {
  786. "description": "Set explicit comments for `commonjs`, `commonjs2`, `amd`, and `root`.",
  787. "type": "object",
  788. "additionalProperties": false,
  789. "properties": {
  790. "amd": {
  791. "description": "Set comment for `amd` section in UMD",
  792. "type": "string"
  793. },
  794. "commonjs": {
  795. "description": "Set comment for `commonjs` (exports) section in UMD",
  796. "type": "string"
  797. },
  798. "commonjs2": {
  799. "description": "Set comment for `commonjs2` (module.exports) section in UMD",
  800. "type": "string"
  801. },
  802. "root": {
  803. "description": "Set comment for `root` (global variable) section in UMD",
  804. "type": "string"
  805. }
  806. }
  807. }
  808. ]
  809. },
  810. "chunkCallbackName": {
  811. "description": "The callback function name used by webpack for loading of chunks in WebWorkers.",
  812. "type": "string"
  813. },
  814. "chunkFilename": {
  815. "description": "The filename of non-entry chunks as relative path inside the `output.path` directory.",
  816. "type": "string",
  817. "absolutePath": false
  818. },
  819. "chunkLoadTimeout": {
  820. "description": "Number of milliseconds before chunk request expires",
  821. "type": "number"
  822. },
  823. "crossOriginLoading": {
  824. "description": "This option enables cross-origin loading of chunks.",
  825. "enum": [false, "anonymous", "use-credentials"]
  826. },
  827. "devtoolFallbackModuleFilenameTemplate": {
  828. "description": "Similar to `output.devtoolModuleFilenameTemplate`, but used in the case of duplicate module identifiers.",
  829. "anyOf": [
  830. {
  831. "type": "string"
  832. },
  833. {
  834. "instanceof": "Function",
  835. "tsType": "Function"
  836. }
  837. ]
  838. },
  839. "devtoolLineToLine": {
  840. "description": "Enable line to line mapped mode for all/specified modules. Line to line mapped mode uses a simple SourceMap where each line of the generated source is mapped to the same line of the original source. It’s a performance optimization. Only use it if your performance need to be better and you are sure that input lines match which generated lines.",
  841. "anyOf": [
  842. {
  843. "description": "`true` enables it for all modules (not recommended)",
  844. "type": "boolean"
  845. },
  846. {
  847. "description": "An object similar to `module.loaders` enables it for specific files.",
  848. "type": "object"
  849. }
  850. ]
  851. },
  852. "devtoolModuleFilenameTemplate": {
  853. "description": "Filename template string of function for the sources array in a generated SourceMap.",
  854. "anyOf": [
  855. {
  856. "type": "string"
  857. },
  858. {
  859. "instanceof": "Function",
  860. "tsType": "Function"
  861. }
  862. ]
  863. },
  864. "devtoolNamespace": {
  865. "description": "Module namespace to use when interpolating filename template string for the sources array in a generated SourceMap. Defaults to `output.library` if not set. It's useful for avoiding runtime collisions in sourcemaps from multiple webpack projects built as libraries.",
  866. "type": "string"
  867. },
  868. "filename": {
  869. "description": "Specifies the name of each output file on disk. You must **not** specify an absolute path here! The `output.path` option determines the location on disk the files are written to, filename is used solely for naming the individual files.",
  870. "anyOf": [
  871. {
  872. "type": "string",
  873. "absolutePath": false
  874. },
  875. {
  876. "instanceof": "Function",
  877. "tsType": "Function"
  878. }
  879. ]
  880. },
  881. "futureEmitAssets": {
  882. "description": "Use the future version of asset emitting logic, which allows freeing memory of assets after emitting. It could break plugins which assume that assets are still readable after emitting. Will be the new default in the next major version.",
  883. "type": "boolean"
  884. },
  885. "globalObject": {
  886. "description": "An expression which is used to address the global object/scope in runtime code",
  887. "type": "string",
  888. "minLength": 1
  889. },
  890. "hashDigest": {
  891. "description": "Digest type used for the hash",
  892. "type": "string"
  893. },
  894. "hashDigestLength": {
  895. "description": "Number of chars which are used for the hash",
  896. "type": "number",
  897. "minimum": 1
  898. },
  899. "hashFunction": {
  900. "description": "Algorithm used for generation the hash (see node.js crypto package)",
  901. "anyOf": [
  902. {
  903. "type": "string",
  904. "minLength": 1
  905. },
  906. {
  907. "instanceof": "Function",
  908. "tsType": "import('../lib/util/createHash').HashConstructor"
  909. }
  910. ]
  911. },
  912. "hashSalt": {
  913. "description": "Any string which is added to the hash to salt it",
  914. "type": "string",
  915. "minLength": 1
  916. },
  917. "hotUpdateChunkFilename": {
  918. "description": "The filename of the Hot Update Chunks. They are inside the output.path directory.",
  919. "anyOf": [
  920. {
  921. "type": "string",
  922. "absolutePath": false
  923. },
  924. {
  925. "instanceof": "Function",
  926. "tsType": "Function"
  927. }
  928. ]
  929. },
  930. "hotUpdateFunction": {
  931. "description": "The JSONP function used by webpack for async loading of hot update chunks.",
  932. "type": "string"
  933. },
  934. "hotUpdateMainFilename": {
  935. "description": "The filename of the Hot Update Main File. It is inside the `output.path` directory.",
  936. "anyOf": [
  937. {
  938. "type": "string",
  939. "absolutePath": false
  940. },
  941. {
  942. "instanceof": "Function",
  943. "tsType": "Function"
  944. }
  945. ]
  946. },
  947. "jsonpFunction": {
  948. "description": "The JSONP function used by webpack for async loading of chunks.",
  949. "type": "string"
  950. },
  951. "jsonpScriptType": {
  952. "description": "This option enables loading async chunks via a custom script type, such as script type=\"module\"",
  953. "enum": [false, "text/javascript", "module"]
  954. },
  955. "library": {
  956. "description": "If set, export the bundle as library. `output.library` is the name.",
  957. "anyOf": [
  958. {
  959. "type": "string"
  960. },
  961. {
  962. "type": "array",
  963. "items": {
  964. "description": "A part of the library name",
  965. "type": "string"
  966. }
  967. },
  968. {
  969. "$ref": "#/definitions/LibraryCustomUmdObject"
  970. }
  971. ]
  972. },
  973. "libraryExport": {
  974. "description": "Specify which export should be exposed as library",
  975. "anyOf": [
  976. {
  977. "type": "string"
  978. },
  979. {
  980. "$ref": "#/definitions/ArrayOfStringValues"
  981. }
  982. ]
  983. },
  984. "libraryTarget": {
  985. "description": "Type of library",
  986. "enum": [
  987. "var",
  988. "assign",
  989. "this",
  990. "window",
  991. "self",
  992. "global",
  993. "commonjs",
  994. "commonjs2",
  995. "commonjs-module",
  996. "amd",
  997. "amd-require",
  998. "umd",
  999. "umd2",
  1000. "jsonp",
  1001. "system"
  1002. ]
  1003. },
  1004. "path": {
  1005. "description": "The output directory as **absolute path** (required).",
  1006. "type": "string",
  1007. "absolutePath": true
  1008. },
  1009. "pathinfo": {
  1010. "description": "Include comments with information about the modules.",
  1011. "type": "boolean"
  1012. },
  1013. "publicPath": {
  1014. "description": "The `publicPath` specifies the public URL address of the output files when referenced in a browser.",
  1015. "anyOf": [
  1016. {
  1017. "type": "string"
  1018. },
  1019. {
  1020. "instanceof": "Function",
  1021. "tsType": "Function"
  1022. }
  1023. ]
  1024. },
  1025. "sourceMapFilename": {
  1026. "description": "The filename of the SourceMaps for the JavaScript files. They are inside the `output.path` directory.",
  1027. "type": "string",
  1028. "absolutePath": false
  1029. },
  1030. "sourcePrefix": {
  1031. "description": "Prefixes every line of the source in the bundle with this string.",
  1032. "type": "string"
  1033. },
  1034. "strictModuleExceptionHandling": {
  1035. "description": "Handles exceptions in module loading correctly at a performance cost.",
  1036. "type": "boolean"
  1037. },
  1038. "umdNamedDefine": {
  1039. "description": "If `output.libraryTarget` is set to umd and `output.library` is set, setting this to true will name the AMD module.",
  1040. "type": "boolean"
  1041. },
  1042. "webassemblyModuleFilename": {
  1043. "description": "The filename of WebAssembly modules as relative path inside the `output.path` directory.",
  1044. "type": "string",
  1045. "absolutePath": false
  1046. }
  1047. }
  1048. },
  1049. "PerformanceOptions": {
  1050. "type": "object",
  1051. "additionalProperties": false,
  1052. "properties": {
  1053. "assetFilter": {
  1054. "description": "Filter function to select assets that are checked",
  1055. "instanceof": "Function",
  1056. "tsType": "Function"
  1057. },
  1058. "hints": {
  1059. "description": "Sets the format of the hints: warnings, errors or nothing at all",
  1060. "enum": [false, "warning", "error"]
  1061. },
  1062. "maxAssetSize": {
  1063. "description": "Filesize limit (in bytes) when exceeded, that webpack will provide performance hints",
  1064. "type": "number"
  1065. },
  1066. "maxEntrypointSize": {
  1067. "description": "Total size of an entry point (in bytes)",
  1068. "type": "number"
  1069. }
  1070. }
  1071. },
  1072. "ResolveOptions": {
  1073. "type": "object",
  1074. "additionalProperties": false,
  1075. "properties": {
  1076. "alias": {
  1077. "description": "Redirect module requests",
  1078. "anyOf": [
  1079. {
  1080. "type": "object",
  1081. "additionalProperties": {
  1082. "description": "New request",
  1083. "type": "string"
  1084. }
  1085. },
  1086. {
  1087. "type": "array",
  1088. "items": {
  1089. "description": "Alias configuration",
  1090. "type": "object",
  1091. "additionalProperties": false,
  1092. "properties": {
  1093. "alias": {
  1094. "description": "New request",
  1095. "type": "string"
  1096. },
  1097. "name": {
  1098. "description": "Request to be redirected",
  1099. "type": "string"
  1100. },
  1101. "onlyModule": {
  1102. "description": "Redirect only exact matching request",
  1103. "type": "boolean"
  1104. }
  1105. }
  1106. }
  1107. }
  1108. ]
  1109. },
  1110. "aliasFields": {
  1111. "description": "Fields in the description file (package.json) which are used to redirect requests inside the module",
  1112. "anyOf": [
  1113. {
  1114. "$ref": "#/definitions/ArrayOfStringOrStringArrayValues"
  1115. }
  1116. ]
  1117. },
  1118. "cachePredicate": {
  1119. "description": "Predicate function to decide which requests should be cached",
  1120. "instanceof": "Function",
  1121. "tsType": "Function"
  1122. },
  1123. "cacheWithContext": {
  1124. "description": "Include the context information in the cache identifier when caching",
  1125. "type": "boolean"
  1126. },
  1127. "concord": {
  1128. "description": "Enable concord resolving extras",
  1129. "type": "boolean"
  1130. },
  1131. "descriptionFiles": {
  1132. "description": "Filenames used to find a description file",
  1133. "anyOf": [
  1134. {
  1135. "$ref": "#/definitions/ArrayOfStringValues"
  1136. }
  1137. ]
  1138. },
  1139. "enforceExtension": {
  1140. "description": "Enforce using one of the extensions from the extensions option",
  1141. "type": "boolean"
  1142. },
  1143. "enforceModuleExtension": {
  1144. "description": "Enforce using one of the module extensions from the moduleExtensions option",
  1145. "type": "boolean"
  1146. },
  1147. "extensions": {
  1148. "description": "Extensions added to the request when trying to find the file",
  1149. "anyOf": [
  1150. {
  1151. "$ref": "#/definitions/ArrayOfStringValues"
  1152. }
  1153. ]
  1154. },
  1155. "fileSystem": {
  1156. "description": "Filesystem for the resolver"
  1157. },
  1158. "mainFields": {
  1159. "description": "Field names from the description file (package.json) which are used to find the default entry point",
  1160. "anyOf": [
  1161. {
  1162. "$ref": "#/definitions/ArrayOfStringOrStringArrayValues"
  1163. }
  1164. ]
  1165. },
  1166. "mainFiles": {
  1167. "description": "Filenames used to find the default entry point if there is no description file or main field",
  1168. "anyOf": [
  1169. {
  1170. "$ref": "#/definitions/ArrayOfStringValues"
  1171. }
  1172. ]
  1173. },
  1174. "moduleExtensions": {
  1175. "description": "Extensions added to the module request when trying to find the module",
  1176. "anyOf": [
  1177. {
  1178. "$ref": "#/definitions/ArrayOfStringValues"
  1179. }
  1180. ]
  1181. },
  1182. "modules": {
  1183. "description": "Folder names or directory paths where to find modules",
  1184. "anyOf": [
  1185. {
  1186. "$ref": "#/definitions/ArrayOfStringValues"
  1187. }
  1188. ]
  1189. },
  1190. "plugins": {
  1191. "description": "Plugins for the resolver",
  1192. "type": "array",
  1193. "items": {
  1194. "description": "Plugin of type object or instanceof Function",
  1195. "anyOf": [
  1196. {
  1197. "$ref": "#/definitions/WebpackPluginInstance"
  1198. },
  1199. {
  1200. "$ref": "#/definitions/WebpackPluginFunction"
  1201. }
  1202. ]
  1203. }
  1204. },
  1205. "resolver": {
  1206. "description": "Custom resolver"
  1207. },
  1208. "symlinks": {
  1209. "description": "Enable resolving symlinks to the original location",
  1210. "type": "boolean"
  1211. },
  1212. "unsafeCache": {
  1213. "description": "Enable caching of successfully resolved requests",
  1214. "anyOf": [
  1215. {
  1216. "type": "boolean"
  1217. },
  1218. {
  1219. "type": "object",
  1220. "additionalProperties": true
  1221. }
  1222. ]
  1223. },
  1224. "useSyncFileSystemCalls": {
  1225. "description": "Use synchronous filesystem calls for the resolver",
  1226. "type": "boolean"
  1227. }
  1228. }
  1229. },
  1230. "RuleSetCondition": {
  1231. "anyOf": [
  1232. {
  1233. "instanceof": "RegExp",
  1234. "tsType": "RegExp"
  1235. },
  1236. {
  1237. "type": "string",
  1238. "minLength": 1
  1239. },
  1240. {
  1241. "instanceof": "Function",
  1242. "tsType": "((value: string) => boolean)"
  1243. },
  1244. {
  1245. "$ref": "#/definitions/RuleSetConditions"
  1246. },
  1247. {
  1248. "type": "object",
  1249. "additionalProperties": false,
  1250. "properties": {
  1251. "and": {
  1252. "description": "Logical AND",
  1253. "anyOf": [
  1254. {
  1255. "$ref": "#/definitions/RuleSetConditions"
  1256. }
  1257. ]
  1258. },
  1259. "exclude": {
  1260. "description": "Exclude all modules matching any of these conditions",
  1261. "anyOf": [
  1262. {
  1263. "$ref": "#/definitions/RuleSetConditionOrConditions"
  1264. }
  1265. ]
  1266. },
  1267. "include": {
  1268. "description": "Exclude all modules matching not any of these conditions",
  1269. "anyOf": [
  1270. {
  1271. "$ref": "#/definitions/RuleSetConditionOrConditions"
  1272. }
  1273. ]
  1274. },
  1275. "not": {
  1276. "description": "Logical NOT",
  1277. "anyOf": [
  1278. {
  1279. "$ref": "#/definitions/RuleSetConditions"
  1280. }
  1281. ]
  1282. },
  1283. "or": {
  1284. "description": "Logical OR",
  1285. "anyOf": [
  1286. {
  1287. "$ref": "#/definitions/RuleSetConditions"
  1288. }
  1289. ]
  1290. },
  1291. "test": {
  1292. "description": "Exclude all modules matching any of these conditions",
  1293. "anyOf": [
  1294. {
  1295. "$ref": "#/definitions/RuleSetConditionOrConditions"
  1296. }
  1297. ]
  1298. }
  1299. }
  1300. }
  1301. ]
  1302. },
  1303. "RuleSetConditionAbsolute": {
  1304. "anyOf": [
  1305. {
  1306. "instanceof": "RegExp",
  1307. "tsType": "RegExp"
  1308. },
  1309. {
  1310. "type": "string",
  1311. "absolutePath": true
  1312. },
  1313. {
  1314. "instanceof": "Function",
  1315. "tsType": "((value: string) => boolean)"
  1316. },
  1317. {
  1318. "$ref": "#/definitions/RuleSetConditionsAbsolute"
  1319. },
  1320. {
  1321. "type": "object",
  1322. "additionalProperties": false,
  1323. "properties": {
  1324. "and": {
  1325. "description": "Logical AND",
  1326. "anyOf": [
  1327. {
  1328. "$ref": "#/definitions/RuleSetConditionsAbsolute"
  1329. }
  1330. ]
  1331. },
  1332. "exclude": {
  1333. "description": "Exclude all modules matching any of these conditions",
  1334. "anyOf": [
  1335. {
  1336. "$ref": "#/definitions/RuleSetConditionOrConditionsAbsolute"
  1337. }
  1338. ]
  1339. },
  1340. "include": {
  1341. "description": "Exclude all modules matching not any of these conditions",
  1342. "anyOf": [
  1343. {
  1344. "$ref": "#/definitions/RuleSetConditionOrConditionsAbsolute"
  1345. }
  1346. ]
  1347. },
  1348. "not": {
  1349. "description": "Logical NOT",
  1350. "anyOf": [
  1351. {
  1352. "$ref": "#/definitions/RuleSetConditionsAbsolute"
  1353. }
  1354. ]
  1355. },
  1356. "or": {
  1357. "description": "Logical OR",
  1358. "anyOf": [
  1359. {
  1360. "$ref": "#/definitions/RuleSetConditionsAbsolute"
  1361. }
  1362. ]
  1363. },
  1364. "test": {
  1365. "description": "Exclude all modules matching any of these conditions",
  1366. "anyOf": [
  1367. {
  1368. "$ref": "#/definitions/RuleSetConditionOrConditionsAbsolute"
  1369. }
  1370. ]
  1371. }
  1372. }
  1373. }
  1374. ]
  1375. },
  1376. "RuleSetConditionOrConditions": {
  1377. "description": "One or multiple rule conditions",
  1378. "anyOf": [
  1379. {
  1380. "$ref": "#/definitions/RuleSetCondition"
  1381. },
  1382. {
  1383. "$ref": "#/definitions/RuleSetConditions"
  1384. }
  1385. ]
  1386. },
  1387. "RuleSetConditionOrConditionsAbsolute": {
  1388. "description": "One or multiple rule conditions",
  1389. "anyOf": [
  1390. {
  1391. "$ref": "#/definitions/RuleSetConditionAbsolute"
  1392. },
  1393. {
  1394. "$ref": "#/definitions/RuleSetConditionsAbsolute"
  1395. }
  1396. ]
  1397. },
  1398. "RuleSetConditions": {
  1399. "type": "array",
  1400. "items": {
  1401. "description": "A rule condition",
  1402. "anyOf": [
  1403. {
  1404. "$ref": "#/definitions/RuleSetCondition"
  1405. }
  1406. ]
  1407. },
  1408. "tsType": "RuleSetConditionsRecursive"
  1409. },
  1410. "RuleSetConditionsAbsolute": {
  1411. "type": "array",
  1412. "items": {
  1413. "description": "A rule condition",
  1414. "anyOf": [
  1415. {
  1416. "$ref": "#/definitions/RuleSetConditionAbsolute"
  1417. }
  1418. ]
  1419. },
  1420. "tsType": "RuleSetConditionsAbsoluteRecursive"
  1421. },
  1422. "RuleSetLoader": {
  1423. "type": "string",
  1424. "minLength": 1
  1425. },
  1426. "RuleSetQuery": {
  1427. "anyOf": [
  1428. {
  1429. "type": "object"
  1430. },
  1431. {
  1432. "type": "string"
  1433. }
  1434. ]
  1435. },
  1436. "RuleSetRule": {
  1437. "type": "object",
  1438. "additionalProperties": false,
  1439. "properties": {
  1440. "compiler": {
  1441. "description": "Match the child compiler name",
  1442. "anyOf": [
  1443. {
  1444. "$ref": "#/definitions/RuleSetConditionOrConditions"
  1445. }
  1446. ]
  1447. },
  1448. "enforce": {
  1449. "description": "Enforce this rule as pre or post step",
  1450. "enum": ["pre", "post"]
  1451. },
  1452. "exclude": {
  1453. "description": "Shortcut for resource.exclude",
  1454. "anyOf": [
  1455. {
  1456. "$ref": "#/definitions/RuleSetConditionOrConditionsAbsolute"
  1457. }
  1458. ]
  1459. },
  1460. "include": {
  1461. "description": "Shortcut for resource.include",
  1462. "anyOf": [
  1463. {
  1464. "$ref": "#/definitions/RuleSetConditionOrConditionsAbsolute"
  1465. }
  1466. ]
  1467. },
  1468. "issuer": {
  1469. "description": "Match the issuer of the module (The module pointing to this module)",
  1470. "anyOf": [
  1471. {
  1472. "$ref": "#/definitions/RuleSetConditionOrConditionsAbsolute"
  1473. }
  1474. ]
  1475. },
  1476. "loader": {
  1477. "description": "Shortcut for use.loader",
  1478. "anyOf": [
  1479. {
  1480. "$ref": "#/definitions/RuleSetLoader"
  1481. },
  1482. {
  1483. "$ref": "#/definitions/RuleSetUse"
  1484. }
  1485. ]
  1486. },
  1487. "loaders": {
  1488. "description": "Shortcut for use.loader",
  1489. "anyOf": [
  1490. {
  1491. "$ref": "#/definitions/RuleSetUse"
  1492. }
  1493. ]
  1494. },
  1495. "oneOf": {
  1496. "description": "Only execute the first matching rule in this array",
  1497. "anyOf": [
  1498. {
  1499. "$ref": "#/definitions/RuleSetRules"
  1500. }
  1501. ]
  1502. },
  1503. "options": {
  1504. "description": "Shortcut for use.options",
  1505. "anyOf": [
  1506. {
  1507. "$ref": "#/definitions/RuleSetQuery"
  1508. }
  1509. ]
  1510. },
  1511. "parser": {
  1512. "description": "Options for parsing",
  1513. "type": "object",
  1514. "additionalProperties": true
  1515. },
  1516. "query": {
  1517. "description": "Shortcut for use.query",
  1518. "anyOf": [
  1519. {
  1520. "$ref": "#/definitions/RuleSetQuery"
  1521. }
  1522. ]
  1523. },
  1524. "realResource": {
  1525. "description": "Match rules with custom resource name",
  1526. "anyOf": [
  1527. {
  1528. "$ref": "#/definitions/RuleSetConditionOrConditionsAbsolute"
  1529. }
  1530. ]
  1531. },
  1532. "resolve": {
  1533. "description": "Options for the resolver",
  1534. "type": "object",
  1535. "anyOf": [
  1536. {
  1537. "$ref": "#/definitions/ResolveOptions"
  1538. }
  1539. ]
  1540. },
  1541. "resource": {
  1542. "description": "Match the resource path of the module",
  1543. "anyOf": [
  1544. {
  1545. "$ref": "#/definitions/RuleSetConditionOrConditionsAbsolute"
  1546. }
  1547. ]
  1548. },
  1549. "resourceQuery": {
  1550. "description": "Match the resource query of the module",
  1551. "anyOf": [
  1552. {
  1553. "$ref": "#/definitions/RuleSetConditionOrConditions"
  1554. }
  1555. ]
  1556. },
  1557. "rules": {
  1558. "description": "Match and execute these rules when this rule is matched",
  1559. "anyOf": [
  1560. {
  1561. "$ref": "#/definitions/RuleSetRules"
  1562. }
  1563. ]
  1564. },
  1565. "sideEffects": {
  1566. "description": "Flags a module as with or without side effects",
  1567. "type": "boolean"
  1568. },
  1569. "test": {
  1570. "description": "Shortcut for resource.test",
  1571. "anyOf": [
  1572. {
  1573. "$ref": "#/definitions/RuleSetConditionOrConditionsAbsolute"
  1574. }
  1575. ]
  1576. },
  1577. "type": {
  1578. "description": "Module type to use for the module",
  1579. "enum": [
  1580. "javascript/auto",
  1581. "javascript/dynamic",
  1582. "javascript/esm",
  1583. "json",
  1584. "webassembly/experimental"
  1585. ]
  1586. },
  1587. "use": {
  1588. "description": "Modifiers applied to the module when rule is matched",
  1589. "anyOf": [
  1590. {
  1591. "$ref": "#/definitions/RuleSetUse"
  1592. }
  1593. ]
  1594. }
  1595. }
  1596. },
  1597. "RuleSetRules": {
  1598. "type": "array",
  1599. "items": {
  1600. "description": "A rule",
  1601. "anyOf": [
  1602. {
  1603. "$ref": "#/definitions/RuleSetRule"
  1604. }
  1605. ]
  1606. }
  1607. },
  1608. "RuleSetUse": {
  1609. "anyOf": [
  1610. {
  1611. "$ref": "#/definitions/RuleSetUseItem"
  1612. },
  1613. {
  1614. "instanceof": "Function",
  1615. "tsType": "Function"
  1616. },
  1617. {
  1618. "type": "array",
  1619. "items": {
  1620. "description": "An use item",
  1621. "anyOf": [
  1622. {
  1623. "$ref": "#/definitions/RuleSetUseItem"
  1624. }
  1625. ]
  1626. }
  1627. }
  1628. ]
  1629. },
  1630. "RuleSetUseItem": {
  1631. "anyOf": [
  1632. {
  1633. "$ref": "#/definitions/RuleSetLoader"
  1634. },
  1635. {
  1636. "instanceof": "Function",
  1637. "tsType": "Function"
  1638. },
  1639. {
  1640. "type": "object",
  1641. "additionalProperties": false,
  1642. "properties": {
  1643. "ident": {
  1644. "description": "Unique loader identifier",
  1645. "type": "string"
  1646. },
  1647. "loader": {
  1648. "description": "Loader name",
  1649. "anyOf": [
  1650. {
  1651. "$ref": "#/definitions/RuleSetLoader"
  1652. }
  1653. ]
  1654. },
  1655. "options": {
  1656. "description": "Loader options",
  1657. "anyOf": [
  1658. {
  1659. "$ref": "#/definitions/RuleSetQuery"
  1660. }
  1661. ]
  1662. },
  1663. "query": {
  1664. "description": "Loader query",
  1665. "anyOf": [
  1666. {
  1667. "$ref": "#/definitions/RuleSetQuery"
  1668. }
  1669. ]
  1670. }
  1671. }
  1672. }
  1673. ]
  1674. },
  1675. "StatsOptions": {
  1676. "type": "object",
  1677. "additionalProperties": false,
  1678. "properties": {
  1679. "all": {
  1680. "description": "fallback value for stats options when an option is not defined (has precedence over local webpack defaults)",
  1681. "type": "boolean"
  1682. },
  1683. "assets": {
  1684. "description": "add assets information",
  1685. "type": "boolean"
  1686. },
  1687. "assetsSort": {
  1688. "description": "sort the assets by that field",
  1689. "type": "string"
  1690. },
  1691. "builtAt": {
  1692. "description": "add built at time information",
  1693. "type": "boolean"
  1694. },
  1695. "cached": {
  1696. "description": "add also information about cached (not built) modules",
  1697. "type": "boolean"
  1698. },
  1699. "cachedAssets": {
  1700. "description": "Show cached assets (setting this to `false` only shows emitted files)",
  1701. "type": "boolean"
  1702. },
  1703. "children": {
  1704. "description": "add children information",
  1705. "type": "boolean"
  1706. },
  1707. "chunkGroups": {
  1708. "description": "Display all chunk groups with the corresponding bundles",
  1709. "type": "boolean"
  1710. },
  1711. "chunkModules": {
  1712. "description": "add built modules information to chunk information",
  1713. "type": "boolean"
  1714. },
  1715. "chunkOrigins": {
  1716. "description": "add the origins of chunks and chunk merging info",
  1717. "type": "boolean"
  1718. },
  1719. "chunks": {
  1720. "description": "add chunk information",
  1721. "type": "boolean"
  1722. },
  1723. "chunksSort": {
  1724. "description": "sort the chunks by that field",
  1725. "type": "string"
  1726. },
  1727. "colors": {
  1728. "description": "Enables/Disables colorful output",
  1729. "oneOf": [
  1730. {
  1731. "description": "`webpack --colors` equivalent",
  1732. "type": "boolean"
  1733. },
  1734. {
  1735. "type": "object",
  1736. "additionalProperties": false,
  1737. "properties": {
  1738. "bold": {
  1739. "description": "Custom color for bold text",
  1740. "type": "string"
  1741. },
  1742. "cyan": {
  1743. "description": "Custom color for cyan text",
  1744. "type": "string"
  1745. },
  1746. "green": {
  1747. "description": "Custom color for green text",
  1748. "type": "string"
  1749. },
  1750. "magenta": {
  1751. "description": "Custom color for magenta text",
  1752. "type": "string"
  1753. },
  1754. "red": {
  1755. "description": "Custom color for red text",
  1756. "type": "string"
  1757. },
  1758. "yellow": {
  1759. "description": "Custom color for yellow text",
  1760. "type": "string"
  1761. }
  1762. }
  1763. }
  1764. ]
  1765. },
  1766. "context": {
  1767. "description": "context directory for request shortening",
  1768. "type": "string",
  1769. "absolutePath": true
  1770. },
  1771. "depth": {
  1772. "description": "add module depth in module graph",
  1773. "type": "boolean"
  1774. },
  1775. "entrypoints": {
  1776. "description": "Display the entry points with the corresponding bundles",
  1777. "type": "boolean"
  1778. },
  1779. "env": {
  1780. "description": "add --env information",
  1781. "type": "boolean"
  1782. },
  1783. "errorDetails": {
  1784. "description": "add details to errors (like resolving log)",
  1785. "type": "boolean"
  1786. },
  1787. "errors": {
  1788. "description": "add errors",
  1789. "type": "boolean"
  1790. },
  1791. "exclude": {
  1792. "description": "Please use excludeModules instead.",
  1793. "anyOf": [
  1794. {
  1795. "$ref": "#/definitions/FilterTypes"
  1796. },
  1797. {
  1798. "type": "boolean"
  1799. }
  1800. ]
  1801. },
  1802. "excludeAssets": {
  1803. "description": "Suppress assets that match the specified filters. Filters can be Strings, RegExps or Functions",
  1804. "anyOf": [
  1805. {
  1806. "$ref": "#/definitions/FilterTypes"
  1807. }
  1808. ]
  1809. },
  1810. "excludeModules": {
  1811. "description": "Suppress modules that match the specified filters. Filters can be Strings, RegExps, Booleans or Functions",
  1812. "anyOf": [
  1813. {
  1814. "$ref": "#/definitions/FilterTypes"
  1815. },
  1816. {
  1817. "type": "boolean"
  1818. }
  1819. ]
  1820. },
  1821. "hash": {
  1822. "description": "add the hash of the compilation",
  1823. "type": "boolean"
  1824. },
  1825. "logging": {
  1826. "description": "add logging output",
  1827. "anyOf": [
  1828. {
  1829. "description": "enable/disable logging output (true: shows normal logging output, loglevel: log)",
  1830. "type": "boolean"
  1831. },
  1832. {
  1833. "description": "specify log level of logging output",
  1834. "enum": ["none", "error", "warn", "info", "log", "verbose"]
  1835. }
  1836. ]
  1837. },
  1838. "loggingDebug": {
  1839. "description": "Include debug logging of specified loggers (i. e. for plugins or loaders). Filters can be Strings, RegExps or Functions",
  1840. "anyOf": [
  1841. {
  1842. "$ref": "#/definitions/FilterTypes"
  1843. },
  1844. {
  1845. "description": "Enable/Disable debug logging for all loggers",
  1846. "type": "boolean"
  1847. }
  1848. ]
  1849. },
  1850. "loggingTrace": {
  1851. "description": "add stack traces to logging output",
  1852. "type": "boolean"
  1853. },
  1854. "maxModules": {
  1855. "description": "Set the maximum number of modules to be shown",
  1856. "type": "number"
  1857. },
  1858. "moduleAssets": {
  1859. "description": "add information about assets inside modules",
  1860. "type": "boolean"
  1861. },
  1862. "moduleTrace": {
  1863. "description": "add dependencies and origin of warnings/errors",
  1864. "type": "boolean"
  1865. },
  1866. "modules": {
  1867. "description": "add built modules information",
  1868. "type": "boolean"
  1869. },
  1870. "modulesSort": {
  1871. "description": "sort the modules by that field",
  1872. "type": "string"
  1873. },
  1874. "nestedModules": {
  1875. "description": "add information about modules nested in other modules (like with module concatenation)",
  1876. "type": "boolean"
  1877. },
  1878. "optimizationBailout": {
  1879. "description": "show reasons why optimization bailed out for modules",
  1880. "type": "boolean"
  1881. },
  1882. "outputPath": {
  1883. "description": "Add output path information",
  1884. "type": "boolean"
  1885. },
  1886. "performance": {
  1887. "description": "add performance hint flags",
  1888. "type": "boolean"
  1889. },
  1890. "providedExports": {
  1891. "description": "show exports provided by modules",
  1892. "type": "boolean"
  1893. },
  1894. "publicPath": {
  1895. "description": "Add public path information",
  1896. "type": "boolean"
  1897. },
  1898. "reasons": {
  1899. "description": "add information about the reasons why modules are included",
  1900. "type": "boolean"
  1901. },
  1902. "source": {
  1903. "description": "add the source code of modules",
  1904. "type": "boolean"
  1905. },
  1906. "timings": {
  1907. "description": "add timing information",
  1908. "type": "boolean"
  1909. },
  1910. "usedExports": {
  1911. "description": "show exports used by modules",
  1912. "type": "boolean"
  1913. },
  1914. "version": {
  1915. "description": "add webpack version information",
  1916. "type": "boolean"
  1917. },
  1918. "warnings": {
  1919. "description": "add warnings",
  1920. "type": "boolean"
  1921. },
  1922. "warningsFilter": {
  1923. "description": "Suppress warnings that match the specified filters. Filters can be Strings, RegExps or Functions",
  1924. "anyOf": [
  1925. {
  1926. "$ref": "#/definitions/FilterTypes"
  1927. }
  1928. ]
  1929. }
  1930. }
  1931. },
  1932. "WebpackPluginFunction": {
  1933. "description": "Function acting as plugin",
  1934. "instanceof": "Function",
  1935. "tsType": "(this: import('../lib/Compiler'), compiler: import('../lib/Compiler')) => void"
  1936. },
  1937. "WebpackPluginInstance": {
  1938. "description": "Plugin instance",
  1939. "type": "object",
  1940. "additionalProperties": true,
  1941. "properties": {
  1942. "apply": {
  1943. "description": "The run point of the plugin, required method.",
  1944. "instanceof": "Function",
  1945. "tsType": "(compiler: import('../lib/Compiler')) => void"
  1946. }
  1947. },
  1948. "required": ["apply"]
  1949. }
  1950. },
  1951. "type": "object",
  1952. "additionalProperties": false,
  1953. "properties": {
  1954. "amd": {
  1955. "description": "Set the value of `require.amd` and `define.amd`. Or disable AMD support.",
  1956. "anyOf": [
  1957. {
  1958. "description": "You can pass `false` to disable AMD support.",
  1959. "enum": [false]
  1960. },
  1961. {
  1962. "description": "You can pass an object to set the value of `require.amd` and `define.amd`.",
  1963. "type": "object"
  1964. }
  1965. ]
  1966. },
  1967. "bail": {
  1968. "description": "Report the first error as a hard error instead of tolerating it.",
  1969. "type": "boolean"
  1970. },
  1971. "cache": {
  1972. "description": "Cache generated modules and chunks to improve performance for multiple incremental builds.",
  1973. "anyOf": [
  1974. {
  1975. "description": "You can pass `false` to disable it.",
  1976. "type": "boolean"
  1977. },
  1978. {
  1979. "description": "You can pass an object to enable it and let webpack use the passed object as cache. This way you can share the cache object between multiple compiler calls.",
  1980. "type": "object"
  1981. }
  1982. ]
  1983. },
  1984. "context": {
  1985. "description": "The base directory (absolute path!) for resolving the `entry` option. If `output.pathinfo` is set, the included pathinfo is shortened to this directory.",
  1986. "type": "string",
  1987. "absolutePath": true
  1988. },
  1989. "dependencies": {
  1990. "description": "References to other configurations to depend on.",
  1991. "type": "array",
  1992. "items": {
  1993. "description": "References to another configuration to depend on.",
  1994. "type": "string"
  1995. }
  1996. },
  1997. "devServer": {
  1998. "description": "Options for the webpack-dev-server",
  1999. "type": "object"
  2000. },
  2001. "devtool": {
  2002. "description": "A developer tool to enhance debugging.",
  2003. "anyOf": [
  2004. {
  2005. "type": "string"
  2006. },
  2007. {
  2008. "enum": [false]
  2009. }
  2010. ]
  2011. },
  2012. "entry": {
  2013. "description": "The entry point(s) of the compilation.",
  2014. "anyOf": [
  2015. {
  2016. "$ref": "#/definitions/Entry"
  2017. }
  2018. ]
  2019. },
  2020. "externals": {
  2021. "description": "Specify dependencies that shouldn't be resolved by webpack, but should become dependencies of the resulting bundle. The kind of the dependency depends on `output.libraryTarget`.",
  2022. "anyOf": [
  2023. {
  2024. "$ref": "#/definitions/Externals"
  2025. }
  2026. ]
  2027. },
  2028. "infrastructureLogging": {
  2029. "description": "Options for infrastructure level logging",
  2030. "type": "object",
  2031. "additionalProperties": false,
  2032. "properties": {
  2033. "debug": {
  2034. "description": "Enable debug logging for specific loggers",
  2035. "anyOf": [
  2036. {
  2037. "$ref": "#/definitions/FilterTypes"
  2038. },
  2039. {
  2040. "description": "Enable/Disable debug logging for all loggers",
  2041. "type": "boolean"
  2042. }
  2043. ]
  2044. },
  2045. "level": {
  2046. "description": "Log level",
  2047. "enum": ["none", "error", "warn", "info", "log", "verbose"]
  2048. }
  2049. }
  2050. },
  2051. "loader": {
  2052. "description": "Custom values available in the loader context.",
  2053. "type": "object"
  2054. },
  2055. "mode": {
  2056. "description": "Enable production optimizations or development hints.",
  2057. "enum": ["development", "production", "none"]
  2058. },
  2059. "module": {
  2060. "description": "Options affecting the normal modules (`NormalModuleFactory`).",
  2061. "anyOf": [
  2062. {
  2063. "$ref": "#/definitions/ModuleOptions"
  2064. }
  2065. ]
  2066. },
  2067. "name": {
  2068. "description": "Name of the configuration. Used when loading multiple configurations.",
  2069. "type": "string"
  2070. },
  2071. "node": {
  2072. "description": "Include polyfills or mocks for various node stuff.",
  2073. "anyOf": [
  2074. {
  2075. "enum": [false]
  2076. },
  2077. {
  2078. "$ref": "#/definitions/NodeOptions"
  2079. }
  2080. ]
  2081. },
  2082. "optimization": {
  2083. "description": "Enables/Disables integrated optimizations",
  2084. "anyOf": [
  2085. {
  2086. "$ref": "#/definitions/OptimizationOptions"
  2087. }
  2088. ]
  2089. },
  2090. "output": {
  2091. "description": "Options affecting the output of the compilation. `output` options tell webpack how to write the compiled files to disk.",
  2092. "anyOf": [
  2093. {
  2094. "$ref": "#/definitions/OutputOptions"
  2095. }
  2096. ]
  2097. },
  2098. "parallelism": {
  2099. "description": "The number of parallel processed modules in the compilation.",
  2100. "type": "number",
  2101. "minimum": 1
  2102. },
  2103. "performance": {
  2104. "description": "Configuration for web performance recommendations.",
  2105. "anyOf": [
  2106. {
  2107. "enum": [false]
  2108. },
  2109. {
  2110. "$ref": "#/definitions/PerformanceOptions"
  2111. }
  2112. ]
  2113. },
  2114. "plugins": {
  2115. "description": "Add additional plugins to the compiler.",
  2116. "type": "array",
  2117. "items": {
  2118. "description": "Plugin of type object or instanceof Function",
  2119. "anyOf": [
  2120. {
  2121. "$ref": "#/definitions/WebpackPluginInstance"
  2122. },
  2123. {
  2124. "$ref": "#/definitions/WebpackPluginFunction"
  2125. }
  2126. ]
  2127. }
  2128. },
  2129. "profile": {
  2130. "description": "Capture timing information for each module.",
  2131. "type": "boolean"
  2132. },
  2133. "recordsInputPath": {
  2134. "description": "Store compiler state to a json file.",
  2135. "type": "string",
  2136. "absolutePath": true
  2137. },
  2138. "recordsOutputPath": {
  2139. "description": "Load compiler state from a json file.",
  2140. "type": "string",
  2141. "absolutePath": true
  2142. },
  2143. "recordsPath": {
  2144. "description": "Store/Load compiler state from/to a json file. This will result in persistent ids of modules and chunks. An absolute path is expected. `recordsPath` is used for `recordsInputPath` and `recordsOutputPath` if they left undefined.",
  2145. "type": "string",
  2146. "absolutePath": true
  2147. },
  2148. "resolve": {
  2149. "description": "Options for the resolver",
  2150. "anyOf": [
  2151. {
  2152. "$ref": "#/definitions/ResolveOptions"
  2153. }
  2154. ]
  2155. },
  2156. "resolveLoader": {
  2157. "description": "Options for the resolver when resolving loaders",
  2158. "anyOf": [
  2159. {
  2160. "$ref": "#/definitions/ResolveOptions"
  2161. }
  2162. ]
  2163. },
  2164. "serve": {
  2165. "description": "Options for webpack-serve",
  2166. "type": "object"
  2167. },
  2168. "stats": {
  2169. "description": "Used by the webpack CLI program to pass stats options.",
  2170. "anyOf": [
  2171. {
  2172. "$ref": "#/definitions/StatsOptions"
  2173. },
  2174. {
  2175. "type": "boolean"
  2176. },
  2177. {
  2178. "enum": [
  2179. "none",
  2180. "errors-only",
  2181. "minimal",
  2182. "normal",
  2183. "detailed",
  2184. "verbose",
  2185. "errors-warnings"
  2186. ]
  2187. }
  2188. ]
  2189. },
  2190. "target": {
  2191. "description": "Environment to build for",
  2192. "anyOf": [
  2193. {
  2194. "enum": [
  2195. "web",
  2196. "webworker",
  2197. "node",
  2198. "async-node",
  2199. "node-webkit",
  2200. "electron-main",
  2201. "electron-renderer",
  2202. "electron-preload"
  2203. ]
  2204. },
  2205. {
  2206. "instanceof": "Function",
  2207. "tsType": "((compiler: import('../lib/Compiler')) => void)"
  2208. }
  2209. ]
  2210. },
  2211. "watch": {
  2212. "description": "Enter watch mode, which rebuilds on file change.",
  2213. "type": "boolean"
  2214. },
  2215. "watchOptions": {
  2216. "description": "Options for the watcher",
  2217. "type": "object",
  2218. "additionalProperties": false,
  2219. "properties": {
  2220. "aggregateTimeout": {
  2221. "description": "Delay the rebuilt after the first change. Value is a time in ms.",
  2222. "type": "number"
  2223. },
  2224. "ignored": {
  2225. "description": "Ignore some files from watching"
  2226. },
  2227. "poll": {
  2228. "description": "Enable polling mode for watching",
  2229. "anyOf": [
  2230. {
  2231. "description": "`true`: use polling.",
  2232. "type": "boolean"
  2233. },
  2234. {
  2235. "description": "`number`: use polling with specified interval.",
  2236. "type": "number"
  2237. }
  2238. ]
  2239. },
  2240. "stdin": {
  2241. "description": "Stop watching when stdin stream has ended",
  2242. "type": "boolean"
  2243. }
  2244. }
  2245. }
  2246. }
  2247. }