ContainerPlugin.json 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  1. {
  2. "definitions": {
  3. "AmdContainer": {
  4. "description": "Add a container for define/require functions in the AMD module.",
  5. "type": "string",
  6. "minLength": 1
  7. },
  8. "AuxiliaryComment": {
  9. "description": "Add a comment in the UMD wrapper.",
  10. "anyOf": [
  11. {
  12. "description": "Append the same comment above each import style.",
  13. "type": "string"
  14. },
  15. {
  16. "$ref": "#/definitions/LibraryCustomUmdCommentObject"
  17. }
  18. ]
  19. },
  20. "EntryRuntime": {
  21. "description": "The name of the runtime chunk. If set a runtime chunk with this name is created or an existing entrypoint is used as runtime.",
  22. "anyOf": [
  23. {
  24. "enum": [false]
  25. },
  26. {
  27. "type": "string",
  28. "minLength": 1
  29. }
  30. ]
  31. },
  32. "Exposes": {
  33. "description": "Modules that should be exposed by this container. When provided, property name is used as public name, otherwise public name is automatically inferred from request.",
  34. "anyOf": [
  35. {
  36. "type": "array",
  37. "items": {
  38. "description": "Modules that should be exposed by this container.",
  39. "anyOf": [
  40. {
  41. "$ref": "#/definitions/ExposesItem"
  42. },
  43. {
  44. "$ref": "#/definitions/ExposesObject"
  45. }
  46. ]
  47. }
  48. },
  49. {
  50. "$ref": "#/definitions/ExposesObject"
  51. }
  52. ]
  53. },
  54. "ExposesConfig": {
  55. "description": "Advanced configuration for modules that should be exposed by this container.",
  56. "type": "object",
  57. "additionalProperties": false,
  58. "properties": {
  59. "import": {
  60. "description": "Request to a module that should be exposed by this container.",
  61. "anyOf": [
  62. {
  63. "$ref": "#/definitions/ExposesItem"
  64. },
  65. {
  66. "$ref": "#/definitions/ExposesItems"
  67. }
  68. ]
  69. },
  70. "name": {
  71. "description": "Custom chunk name for the exposed module.",
  72. "type": "string"
  73. }
  74. },
  75. "required": ["import"]
  76. },
  77. "ExposesItem": {
  78. "description": "Module that should be exposed by this container.",
  79. "type": "string",
  80. "minLength": 1
  81. },
  82. "ExposesItems": {
  83. "description": "Modules that should be exposed by this container.",
  84. "type": "array",
  85. "items": {
  86. "$ref": "#/definitions/ExposesItem"
  87. }
  88. },
  89. "ExposesObject": {
  90. "description": "Modules that should be exposed by this container. Property names are used as public paths.",
  91. "type": "object",
  92. "additionalProperties": {
  93. "description": "Modules that should be exposed by this container.",
  94. "anyOf": [
  95. {
  96. "$ref": "#/definitions/ExposesConfig"
  97. },
  98. {
  99. "$ref": "#/definitions/ExposesItem"
  100. },
  101. {
  102. "$ref": "#/definitions/ExposesItems"
  103. }
  104. ]
  105. }
  106. },
  107. "LibraryCustomUmdCommentObject": {
  108. "description": "Set explicit comments for `commonjs`, `commonjs2`, `amd`, and `root`.",
  109. "type": "object",
  110. "additionalProperties": false,
  111. "properties": {
  112. "amd": {
  113. "description": "Set comment for `amd` section in UMD.",
  114. "type": "string"
  115. },
  116. "commonjs": {
  117. "description": "Set comment for `commonjs` (exports) section in UMD.",
  118. "type": "string"
  119. },
  120. "commonjs2": {
  121. "description": "Set comment for `commonjs2` (module.exports) section in UMD.",
  122. "type": "string"
  123. },
  124. "root": {
  125. "description": "Set comment for `root` (global variable) section in UMD.",
  126. "type": "string"
  127. }
  128. }
  129. },
  130. "LibraryCustomUmdObject": {
  131. "description": "Description object for all UMD variants of the library name.",
  132. "type": "object",
  133. "additionalProperties": false,
  134. "properties": {
  135. "amd": {
  136. "description": "Name of the exposed AMD library in the UMD.",
  137. "type": "string",
  138. "minLength": 1
  139. },
  140. "commonjs": {
  141. "description": "Name of the exposed commonjs export in the UMD.",
  142. "type": "string",
  143. "minLength": 1
  144. },
  145. "root": {
  146. "description": "Name of the property exposed globally by a UMD library.",
  147. "anyOf": [
  148. {
  149. "type": "array",
  150. "items": {
  151. "description": "Part of the name of the property exposed globally by a UMD library.",
  152. "type": "string",
  153. "minLength": 1
  154. }
  155. },
  156. {
  157. "type": "string",
  158. "minLength": 1
  159. }
  160. ]
  161. }
  162. }
  163. },
  164. "LibraryExport": {
  165. "description": "Specify which export should be exposed as library.",
  166. "anyOf": [
  167. {
  168. "type": "array",
  169. "items": {
  170. "description": "Part of the export that should be exposed as library.",
  171. "type": "string",
  172. "minLength": 1
  173. }
  174. },
  175. {
  176. "type": "string",
  177. "minLength": 1
  178. }
  179. ]
  180. },
  181. "LibraryName": {
  182. "description": "The name of the library (some types allow unnamed libraries too).",
  183. "anyOf": [
  184. {
  185. "type": "array",
  186. "items": {
  187. "description": "A part of the library name.",
  188. "type": "string",
  189. "minLength": 1
  190. },
  191. "minItems": 1
  192. },
  193. {
  194. "type": "string",
  195. "minLength": 1
  196. },
  197. {
  198. "$ref": "#/definitions/LibraryCustomUmdObject"
  199. }
  200. ]
  201. },
  202. "LibraryOptions": {
  203. "description": "Options for library.",
  204. "type": "object",
  205. "additionalProperties": false,
  206. "properties": {
  207. "amdContainer": {
  208. "$ref": "#/definitions/AmdContainer"
  209. },
  210. "auxiliaryComment": {
  211. "$ref": "#/definitions/AuxiliaryComment"
  212. },
  213. "export": {
  214. "$ref": "#/definitions/LibraryExport"
  215. },
  216. "name": {
  217. "$ref": "#/definitions/LibraryName"
  218. },
  219. "type": {
  220. "$ref": "#/definitions/LibraryType"
  221. },
  222. "umdNamedDefine": {
  223. "$ref": "#/definitions/UmdNamedDefine"
  224. }
  225. },
  226. "required": ["type"]
  227. },
  228. "LibraryType": {
  229. "description": "Type of library (types included by default are 'var', 'module', 'assign', 'assign-properties', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'commonjs-static', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins).",
  230. "anyOf": [
  231. {
  232. "enum": [
  233. "var",
  234. "module",
  235. "assign",
  236. "assign-properties",
  237. "this",
  238. "window",
  239. "self",
  240. "global",
  241. "commonjs",
  242. "commonjs2",
  243. "commonjs-module",
  244. "commonjs-static",
  245. "amd",
  246. "amd-require",
  247. "umd",
  248. "umd2",
  249. "jsonp",
  250. "system"
  251. ]
  252. },
  253. {
  254. "type": "string"
  255. }
  256. ]
  257. },
  258. "UmdNamedDefine": {
  259. "description": "If `output.libraryTarget` is set to umd and `output.library` is set, setting this to true will name the AMD module.",
  260. "type": "boolean"
  261. }
  262. },
  263. "title": "ContainerPluginOptions",
  264. "type": "object",
  265. "additionalProperties": false,
  266. "properties": {
  267. "exposes": {
  268. "$ref": "#/definitions/Exposes"
  269. },
  270. "filename": {
  271. "description": "The filename for this container relative path inside the `output.path` directory.",
  272. "type": "string",
  273. "absolutePath": false,
  274. "minLength": 1
  275. },
  276. "library": {
  277. "$ref": "#/definitions/LibraryOptions"
  278. },
  279. "name": {
  280. "description": "The name for this container.",
  281. "type": "string",
  282. "minLength": 1
  283. },
  284. "runtime": {
  285. "$ref": "#/definitions/EntryRuntime"
  286. },
  287. "shareScope": {
  288. "description": "The name of the share scope which is shared with the host (defaults to 'default').",
  289. "type": "string",
  290. "minLength": 1
  291. }
  292. },
  293. "required": ["name", "exposes"]
  294. }