VirtualUrlPlugin.json 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. {
  2. "definitions": {
  3. "VirtualModule": {
  4. "description": "A virtual module definition.",
  5. "type": "object",
  6. "additionalProperties": false,
  7. "properties": {
  8. "source": {
  9. "description": "The source function that provides the virtual content.",
  10. "instanceof": "Function",
  11. "tsType": "((loaderContext: import('webpack').LoaderContext<EXPECTED_ANY>) => Promise<string> | string)"
  12. },
  13. "type": {
  14. "description": "The module type.",
  15. "type": "string"
  16. },
  17. "version": {
  18. "description": "Optional version function or value for cache invalidation.",
  19. "anyOf": [
  20. {
  21. "type": "boolean",
  22. "enum": [true]
  23. },
  24. {
  25. "type": "string"
  26. },
  27. {
  28. "instanceof": "Function",
  29. "tsType": "(() => string | undefined)"
  30. }
  31. ]
  32. }
  33. },
  34. "required": ["source"]
  35. },
  36. "VirtualModuleContent": {
  37. "description": "A virtual module can be a string, a function, or a VirtualModule object.",
  38. "anyOf": [
  39. {
  40. "type": "string"
  41. },
  42. {
  43. "instanceof": "Function",
  44. "tsType": "((loaderContext: import('webpack').LoaderContext<EXPECTED_ANY>) => Promise<string> | string)"
  45. },
  46. {
  47. "$ref": "#/definitions/VirtualModule"
  48. }
  49. ]
  50. },
  51. "VirtualUrlOptions": {
  52. "description": "Options for building virtual resources.",
  53. "type": "object",
  54. "additionalProperties": false,
  55. "properties": {
  56. "modules": {
  57. "description": "The virtual modules configuration.",
  58. "type": "object",
  59. "additionalProperties": {
  60. "$ref": "#/definitions/VirtualModuleContent"
  61. }
  62. },
  63. "scheme": {
  64. "description": "The URL scheme to use for virtual resources.",
  65. "type": "string"
  66. }
  67. },
  68. "required": ["modules"]
  69. }
  70. },
  71. "title": "VirtualUrlPluginOptions",
  72. "oneOf": [
  73. {
  74. "$ref": "#/definitions/VirtualUrlOptions"
  75. }
  76. ]
  77. }