ContainerPlugin.json 8.0 KB

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