SourceMapDevToolPlugin.json 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. {
  2. "definitions": {
  3. "rule": {
  4. "description": "Include source maps for modules based on their extension (defaults to .js and .css).",
  5. "anyOf": [
  6. {
  7. "instanceof": "RegExp",
  8. "tsType": "RegExp"
  9. },
  10. {
  11. "type": "string",
  12. "minLength": 1
  13. }
  14. ]
  15. },
  16. "rules": {
  17. "description": "Include source maps for modules based on their extension (defaults to .js and .css).",
  18. "anyOf": [
  19. {
  20. "type": "array",
  21. "items": {
  22. "description": "A rule condition.",
  23. "oneOf": [
  24. {
  25. "$ref": "#/definitions/rule"
  26. }
  27. ]
  28. }
  29. },
  30. {
  31. "$ref": "#/definitions/rule"
  32. }
  33. ]
  34. }
  35. },
  36. "title": "SourceMapDevToolPluginOptions",
  37. "type": "object",
  38. "additionalProperties": false,
  39. "properties": {
  40. "append": {
  41. "description": "Appends the given value to the original asset. Usually the #sourceMappingURL comment. [url] is replaced with a URL to the source map file. false disables the appending.",
  42. "anyOf": [
  43. {
  44. "description": "Append no SourceMap comment to the bundle, but still generate SourceMaps.",
  45. "enum": [false, null]
  46. },
  47. {
  48. "type": "string",
  49. "minLength": 1
  50. },
  51. {
  52. "instanceof": "Function",
  53. "tsType": "((pathData: import(\"../../lib/Compilation\").PathData, assetInfo?: import(\"../../lib/Compilation\").AssetInfo) => string)"
  54. }
  55. ]
  56. },
  57. "columns": {
  58. "description": "Indicates whether column mappings should be used (defaults to true).",
  59. "type": "boolean"
  60. },
  61. "exclude": {
  62. "description": "Exclude modules that match the given value from source map generation.",
  63. "oneOf": [
  64. {
  65. "$ref": "#/definitions/rules"
  66. }
  67. ]
  68. },
  69. "fallbackModuleFilenameTemplate": {
  70. "description": "Generator string or function to create identifiers of modules for the 'sources' array in the SourceMap used only if 'moduleFilenameTemplate' would result in a conflict.",
  71. "anyOf": [
  72. {
  73. "type": "string",
  74. "minLength": 1
  75. },
  76. {
  77. "description": "Custom function generating the identifier.",
  78. "instanceof": "Function",
  79. "tsType": "Function"
  80. }
  81. ]
  82. },
  83. "fileContext": {
  84. "description": "Path prefix to which the [file] placeholder is relative to.",
  85. "type": "string"
  86. },
  87. "filename": {
  88. "description": "Defines the output filename of the SourceMap (will be inlined if no value is provided).",
  89. "anyOf": [
  90. {
  91. "description": "Disable separate SourceMap file and inline SourceMap as DataUrl.",
  92. "enum": [false, null]
  93. },
  94. {
  95. "type": "string",
  96. "absolutePath": false,
  97. "minLength": 1
  98. }
  99. ]
  100. },
  101. "include": {
  102. "description": "Include source maps for module paths that match the given value.",
  103. "oneOf": [
  104. {
  105. "$ref": "#/definitions/rules"
  106. }
  107. ]
  108. },
  109. "module": {
  110. "description": "Indicates whether SourceMaps from loaders should be used (defaults to true).",
  111. "type": "boolean"
  112. },
  113. "moduleFilenameTemplate": {
  114. "description": "Generator string or function to create identifiers of modules for the 'sources' array in the SourceMap.",
  115. "anyOf": [
  116. {
  117. "type": "string",
  118. "minLength": 1
  119. },
  120. {
  121. "description": "Custom function generating the identifier.",
  122. "instanceof": "Function",
  123. "tsType": "Function"
  124. }
  125. ]
  126. },
  127. "namespace": {
  128. "description": "Namespace prefix to allow multiple webpack roots in the devtools.",
  129. "type": "string"
  130. },
  131. "noSources": {
  132. "description": "Omit the 'sourceContents' array from the SourceMap.",
  133. "type": "boolean"
  134. },
  135. "publicPath": {
  136. "description": "Provide a custom public path for the SourceMapping comment.",
  137. "type": "string"
  138. },
  139. "sourceRoot": {
  140. "description": "Provide a custom value for the 'sourceRoot' property in the SourceMap.",
  141. "type": "string"
  142. },
  143. "test": {
  144. "$ref": "#/definitions/rules"
  145. }
  146. }
  147. }