@umijs/bundler-webpack 3.5.20 → 4.0.0-beta.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (354) hide show
  1. package/README.md +2 -0
  2. package/bin/bundler-webpack.js +1 -2
  3. package/client/client/client.js +202 -0
  4. package/client/constants.js +12 -0
  5. package/client/utils/formatWebpackMessages.js +92 -0
  6. package/compiled/autoprefixer/LICENSE +20 -0
  7. package/compiled/autoprefixer/browserslist/index.d.ts +172 -0
  8. package/compiled/autoprefixer/index.js +9 -0
  9. package/compiled/autoprefixer/lib/autoprefixer.d.ts +95 -0
  10. package/compiled/autoprefixer/package.json +1 -0
  11. package/compiled/autoprefixer/postcss/lib/at-rule.d.ts +106 -0
  12. package/compiled/autoprefixer/postcss/lib/comment.d.ts +56 -0
  13. package/compiled/autoprefixer/postcss/lib/container.d.ts +442 -0
  14. package/compiled/autoprefixer/postcss/lib/css-syntax-error.d.ts +239 -0
  15. package/compiled/autoprefixer/postcss/lib/declaration.d.ts +124 -0
  16. package/compiled/autoprefixer/postcss/lib/document.d.ts +57 -0
  17. package/compiled/autoprefixer/postcss/lib/input.d.ts +150 -0
  18. package/compiled/autoprefixer/postcss/lib/lazy-result.d.ts +176 -0
  19. package/compiled/autoprefixer/postcss/lib/list.d.ts +51 -0
  20. package/compiled/autoprefixer/postcss/lib/no-work-result.d.ts +37 -0
  21. package/compiled/autoprefixer/postcss/lib/node.d.ts +478 -0
  22. package/compiled/autoprefixer/postcss/lib/postcss.d.ts +473 -0
  23. package/compiled/autoprefixer/postcss/lib/previous-map.d.ts +72 -0
  24. package/compiled/autoprefixer/postcss/lib/processor.d.ts +102 -0
  25. package/compiled/autoprefixer/postcss/lib/result.d.ts +196 -0
  26. package/compiled/autoprefixer/postcss/lib/root.d.ts +73 -0
  27. package/compiled/autoprefixer/postcss/lib/rule.d.ts +104 -0
  28. package/compiled/autoprefixer/postcss/lib/warning.d.ts +138 -0
  29. package/compiled/autoprefixer/source-map-js/source-map.d.ts +98 -0
  30. package/compiled/babel-loader/LICENSE +22 -0
  31. package/compiled/babel-loader/index.js +3 -0
  32. package/compiled/babel-loader/package.json +1 -0
  33. package/compiled/compression/LICENSE +23 -0
  34. package/compiled/compression/index.js +57 -0
  35. package/compiled/compression/package.json +1 -0
  36. package/compiled/connect-history-api-fallback/LICENSE +21 -0
  37. package/compiled/connect-history-api-fallback/index.js +1 -0
  38. package/compiled/connect-history-api-fallback/package.json +1 -0
  39. package/{lib/webpack/plugins/mini-css-extract-plugin → compiled/copy-webpack-plugin}/LICENSE +0 -0
  40. package/compiled/copy-webpack-plugin/index.js +46 -0
  41. package/compiled/copy-webpack-plugin/package.json +1 -0
  42. package/{lib/webpack/plugins/terser-webpack-plugin → compiled/css-loader}/LICENSE +0 -0
  43. package/compiled/css-loader/api.js +102 -0
  44. package/compiled/css-loader/getUrl.js +29 -0
  45. package/compiled/css-loader/index.js +2 -0
  46. package/compiled/css-loader/noSourceMaps.js +5 -0
  47. package/compiled/css-loader/package.json +1 -0
  48. package/compiled/css-loader/sourceMaps.js +22 -0
  49. package/compiled/css-minimizer-webpack-plugin/LICENSE +20 -0
  50. package/compiled/css-minimizer-webpack-plugin/index.js +3 -0
  51. package/compiled/css-minimizer-webpack-plugin/minify.js +72 -0
  52. package/compiled/css-minimizer-webpack-plugin/package.json +1 -0
  53. package/compiled/css-minimizer-webpack-plugin/utils.js +166 -0
  54. package/compiled/cssnano/index.js +192 -0
  55. package/compiled/cssnano/package.json +1 -0
  56. package/compiled/express/LICENSE +24 -0
  57. package/compiled/express/body-parser/index.d.ts +104 -0
  58. package/compiled/express/connect/index.d.ts +93 -0
  59. package/compiled/express/express-serve-static-core/index.d.ts +1252 -0
  60. package/compiled/express/index.d.ts +133 -0
  61. package/compiled/express/index.js +338 -0
  62. package/compiled/express/mime/index.d.ts +35 -0
  63. package/compiled/express/package.json +1 -0
  64. package/compiled/express/qs/index.d.ts +62 -0
  65. package/compiled/express/range-parser/index.d.ts +35 -0
  66. package/compiled/express/serve-static/index.d.ts +108 -0
  67. package/compiled/http-proxy-middleware/LICENSE +22 -0
  68. package/compiled/http-proxy-middleware/dist/index.d.ts +4 -0
  69. package/compiled/http-proxy-middleware/dist/types.d.ts +54 -0
  70. package/compiled/http-proxy-middleware/http-proxy/index.d.ts +226 -0
  71. package/compiled/http-proxy-middleware/index.js +66 -0
  72. package/compiled/http-proxy-middleware/package.json +1 -0
  73. package/compiled/less/index.js +31 -0
  74. package/compiled/less/package.json +1 -0
  75. package/compiled/less-loader/LICENSE +20 -0
  76. package/compiled/less-loader/index.js +1 -0
  77. package/compiled/less-loader/package.json +1 -0
  78. package/compiled/mini-css-extract-plugin/LICENSE +20 -0
  79. package/{lib/webpack/plugins/mini-css-extract-plugin/src → compiled/mini-css-extract-plugin}/hmr/hotModuleReplacement.js +50 -52
  80. package/compiled/mini-css-extract-plugin/hmr/normalize-url.js +35 -0
  81. package/compiled/mini-css-extract-plugin/index.js +11644 -0
  82. package/compiled/mini-css-extract-plugin/loader-options.json +32 -0
  83. package/compiled/mini-css-extract-plugin/loader.js +315 -0
  84. package/compiled/mini-css-extract-plugin/package.json +1 -0
  85. package/compiled/mini-css-extract-plugin/utils.js +159 -0
  86. package/compiled/postcss-flexbugs-fixes/LICENSE +20 -0
  87. package/compiled/postcss-flexbugs-fixes/index.js +1 -0
  88. package/compiled/postcss-flexbugs-fixes/package.json +1 -0
  89. package/compiled/postcss-loader/LICENSE +20 -0
  90. package/compiled/postcss-loader/index.js +1 -0
  91. package/compiled/postcss-loader/package.json +1 -0
  92. package/compiled/purgecss-webpack-plugin/LICENSE +21 -0
  93. package/compiled/purgecss-webpack-plugin/index.js +7781 -0
  94. package/compiled/purgecss-webpack-plugin/package.json +1 -0
  95. package/compiled/react-refresh/index.js +19 -0
  96. package/compiled/sass-loader/LICENSE +20 -0
  97. package/compiled/sass-loader/index.js +1 -0
  98. package/compiled/sass-loader/package.json +1 -0
  99. package/compiled/schema-utils/LICENSE +20 -0
  100. package/compiled/schema-utils/ajv/dist/ajv.d.ts +16 -0
  101. package/compiled/schema-utils/ajv/dist/compile/codegen/code.d.ts +39 -0
  102. package/compiled/schema-utils/ajv/dist/compile/codegen/index.d.ts +79 -0
  103. package/compiled/schema-utils/ajv/dist/compile/codegen/scope.d.ts +79 -0
  104. package/compiled/schema-utils/ajv/dist/compile/errors.d.ts +13 -0
  105. package/compiled/schema-utils/ajv/dist/compile/index.d.ts +80 -0
  106. package/compiled/schema-utils/ajv/dist/compile/ref_error.d.ts +5 -0
  107. package/compiled/schema-utils/ajv/dist/compile/resolve.d.ts +12 -0
  108. package/compiled/schema-utils/ajv/dist/compile/rules.d.ts +28 -0
  109. package/compiled/schema-utils/ajv/dist/compile/util.d.ts +40 -0
  110. package/compiled/schema-utils/ajv/dist/compile/validate/index.d.ts +42 -0
  111. package/compiled/schema-utils/ajv/dist/compile/validate/subschema.d.ts +47 -0
  112. package/compiled/schema-utils/ajv/dist/core.d.ts +171 -0
  113. package/compiled/schema-utils/ajv/dist/runtime/validation_error.d.ts +7 -0
  114. package/compiled/schema-utils/ajv/dist/types/index.d.ts +177 -0
  115. package/compiled/schema-utils/ajv/dist/types/json-schema.d.ts +124 -0
  116. package/compiled/schema-utils/ajv/dist/types/jtd-schema.d.ts +168 -0
  117. package/compiled/schema-utils/ajv/lib/ajv.d.ts +397 -0
  118. package/compiled/schema-utils/declarations/ValidationError.d.ts +74 -0
  119. package/compiled/schema-utils/declarations/index.d.ts +3 -0
  120. package/compiled/schema-utils/declarations/validate.d.ts +37 -0
  121. package/compiled/schema-utils/index.js +9 -0
  122. package/compiled/schema-utils/json-schema/index.d.ts +751 -0
  123. package/compiled/schema-utils/package.json +1 -0
  124. package/compiled/schema-utils/uri-js/dist/es5/uri.all.d.ts +59 -0
  125. package/compiled/speed-measure-webpack-plugin/LICENSE +21 -0
  126. package/compiled/speed-measure-webpack-plugin/index.js +1 -0
  127. package/compiled/speed-measure-webpack-plugin/package.json +1 -0
  128. package/compiled/style-loader/LICENSE +20 -0
  129. package/compiled/style-loader/index.js +1 -0
  130. package/compiled/style-loader/package.json +1 -0
  131. package/compiled/style-loader/runtime/injectStylesIntoLinkTag.js +29 -0
  132. package/compiled/style-loader/runtime/injectStylesIntoStyleTag.js +104 -0
  133. package/compiled/style-loader/runtime/insertBySelector.js +39 -0
  134. package/compiled/style-loader/runtime/insertStyleElement.js +11 -0
  135. package/compiled/style-loader/runtime/isEqualLocals.js +35 -0
  136. package/compiled/style-loader/runtime/isOldIE.js +19 -0
  137. package/compiled/style-loader/runtime/setAttributesWithAttributes.js +16 -0
  138. package/compiled/style-loader/runtime/setAttributesWithAttributesAndNonce.js +10 -0
  139. package/compiled/style-loader/runtime/setAttributesWithoutAttributes.js +12 -0
  140. package/compiled/style-loader/runtime/singletonStyleDomAPI.js +93 -0
  141. package/compiled/style-loader/runtime/styleDomAPI.js +70 -0
  142. package/compiled/style-loader/runtime/styleTagTransform.js +16 -0
  143. package/compiled/svgo-loader/LICENSE +22 -0
  144. package/compiled/svgo-loader/index.js +4 -0
  145. package/compiled/svgo-loader/package.json +1 -0
  146. package/compiled/swc-loader/LICENSE +25 -0
  147. package/compiled/swc-loader/index.js +1 -0
  148. package/compiled/swc-loader/package.json +1 -0
  149. package/compiled/tapable/LICENSE +21 -0
  150. package/compiled/tapable/index.js +1 -0
  151. package/compiled/tapable/package.json +1 -0
  152. package/compiled/tapable/tapable.d.ts +116 -0
  153. package/compiled/terser/LICENSE +29 -0
  154. package/compiled/terser/index.js +1 -0
  155. package/compiled/terser/mappings.wasm +0 -0
  156. package/compiled/terser/package.json +1 -0
  157. package/compiled/terser/source-map/source-map.d.ts +369 -0
  158. package/compiled/terser/tools/terser.d.ts +207 -0
  159. package/compiled/terser-webpack-plugin/LICENSE +20 -0
  160. package/compiled/terser-webpack-plugin/ajv/lib/ajv.d.ts +397 -0
  161. package/compiled/terser-webpack-plugin/index.js +15019 -0
  162. package/compiled/terser-webpack-plugin/jest-worker/build/index.d.ts +49 -0
  163. package/compiled/terser-webpack-plugin/jest-worker/build/types.d.ts +143 -0
  164. package/compiled/terser-webpack-plugin/json-schema/index.d.ts +751 -0
  165. package/compiled/terser-webpack-plugin/minify.js +48 -0
  166. package/compiled/terser-webpack-plugin/package.json +1 -0
  167. package/compiled/terser-webpack-plugin/schema-utils/declarations/ValidationError.d.ts +74 -0
  168. package/compiled/terser-webpack-plugin/schema-utils/declarations/index.d.ts +3 -0
  169. package/compiled/terser-webpack-plugin/schema-utils/declarations/validate.d.ts +37 -0
  170. package/compiled/terser-webpack-plugin/source-map/source-map.d.ts +98 -0
  171. package/compiled/terser-webpack-plugin/types/cjs.d.ts +3 -0
  172. package/compiled/terser-webpack-plugin/types/index.d.ts +295 -0
  173. package/compiled/terser-webpack-plugin/types/utils.d.ts +102 -0
  174. package/compiled/terser-webpack-plugin/utils.js +690 -0
  175. package/compiled/url-loader/LICENSE +20 -0
  176. package/compiled/url-loader/index.js +15 -0
  177. package/compiled/url-loader/package.json +1 -0
  178. package/compiled/webpack/Chunk.js +1 -0
  179. package/compiled/webpack/Compilation.js +1 -0
  180. package/compiled/webpack/HotModuleReplacement.runtime.js +394 -0
  181. package/compiled/webpack/JavascriptHotModuleReplacement.runtime.js +462 -0
  182. package/compiled/webpack/LICENSE +20 -0
  183. package/compiled/webpack/LibraryTemplatePlugin.js +1 -0
  184. package/compiled/webpack/LoaderTargetPlugin.js +1 -0
  185. package/compiled/webpack/ModuleFilenameHelpers.js +1 -0
  186. package/compiled/webpack/NormalModule.js +1 -0
  187. package/compiled/webpack/RuntimeGlobals.js +1 -0
  188. package/compiled/webpack/RuntimeModule.js +1 -0
  189. package/compiled/webpack/SingleEntryPlugin.js +1 -0
  190. package/compiled/webpack/Template.js +1 -0
  191. package/compiled/webpack/ajv/lib/ajv.d.ts +397 -0
  192. package/compiled/webpack/deepImports.json +12 -0
  193. package/compiled/webpack/index.js +163291 -0
  194. package/compiled/webpack/json-schema/index.d.ts +751 -0
  195. package/compiled/webpack/lazy-compilation-node.js +40 -0
  196. package/compiled/webpack/lazy-compilation-web.js +74 -0
  197. package/compiled/webpack/package.json +5 -0
  198. package/compiled/webpack/schema-utils/declarations/ValidationError.d.ts +74 -0
  199. package/compiled/webpack/schema-utils/declarations/index.d.ts +3 -0
  200. package/compiled/webpack/schema-utils/declarations/validate.d.ts +37 -0
  201. package/compiled/webpack/types.d.ts +12664 -0
  202. package/compiled/webpack-5-chain/LICENSE +373 -0
  203. package/compiled/webpack-5-chain/index.js +1 -0
  204. package/compiled/webpack-5-chain/package.json +1 -0
  205. package/compiled/webpack-5-chain/types/index.d.ts +543 -0
  206. package/compiled/webpack-bundle-analyzer/LICENSE +20 -0
  207. package/compiled/webpack-bundle-analyzer/index.js +30 -0
  208. package/compiled/webpack-bundle-analyzer/package.json +1 -0
  209. package/compiled/webpack-bundle-analyzer/public/viewer.js +16 -0
  210. package/compiled/webpack-bundle-analyzer/public/viewer.js.LICENSE.txt +10 -0
  211. package/compiled/webpack-bundle-analyzer/public/viewer.js.map +1 -0
  212. package/compiled/webpack-dev-middleware/LICENSE +20 -0
  213. package/compiled/webpack-dev-middleware/index.js +27 -0
  214. package/compiled/webpack-dev-middleware/package.json +1 -0
  215. package/compiled/webpack-sources/LICENSE +21 -0
  216. package/compiled/webpack-sources/index.d.ts +20 -0
  217. package/compiled/webpack-sources/index.js +1 -0
  218. package/compiled/webpack-sources/lib/CachedSource.d.ts +18 -0
  219. package/compiled/webpack-sources/lib/CompatSource.d.ts +9 -0
  220. package/compiled/webpack-sources/lib/ConcatSource.d.ts +22 -0
  221. package/compiled/webpack-sources/lib/OriginalSource.d.ts +18 -0
  222. package/compiled/webpack-sources/lib/PrefixSource.d.ts +12 -0
  223. package/compiled/webpack-sources/lib/RawSource.d.ts +13 -0
  224. package/compiled/webpack-sources/lib/ReplaceSource.d.ts +35 -0
  225. package/compiled/webpack-sources/lib/SizeOnlySource.d.ts +7 -0
  226. package/compiled/webpack-sources/lib/Source.d.ts +45 -0
  227. package/compiled/webpack-sources/lib/SourceMapSource.d.ts +22 -0
  228. package/compiled/webpack-sources/lib/index.d.ts +60 -0
  229. package/compiled/webpack-sources/package.json +1 -0
  230. package/compiled/webpack-sources/source-list-map/index.d.ts +91 -0
  231. package/compiled/webpack-sources/source-map/source-map.d.ts +369 -0
  232. package/compiled/ws/LICENSE +19 -0
  233. package/compiled/ws/index.d.ts +359 -0
  234. package/compiled/ws/index.js +1 -0
  235. package/compiled/ws/package.json +1 -0
  236. package/dist/build.d.ts +17 -0
  237. package/dist/build.js +72 -0
  238. package/{lib → dist}/cli.d.ts +0 -0
  239. package/dist/cli.js +93 -0
  240. package/{lib/webpackHotDevClient/webpackHotDevClient.d.ts → dist/client/client.d.ts} +0 -0
  241. package/dist/client/client.js +239 -0
  242. package/dist/config/_sampleFeature.d.ts +10 -0
  243. package/dist/config/_sampleFeature.js +22 -0
  244. package/dist/config/assetRules.d.ts +11 -0
  245. package/dist/config/assetRules.js +57 -0
  246. package/dist/config/bundleAnalyzerPlugin.d.ts +10 -0
  247. package/dist/config/bundleAnalyzerPlugin.js +30 -0
  248. package/dist/config/compressPlugin.d.ts +10 -0
  249. package/dist/config/compressPlugin.js +77 -0
  250. package/dist/config/config.d.ts +20 -0
  251. package/dist/config/config.js +178 -0
  252. package/dist/config/copyPlugin.d.ts +10 -0
  253. package/dist/config/copyPlugin.js +49 -0
  254. package/dist/config/cssRules.d.ts +11 -0
  255. package/dist/config/cssRules.js +98 -0
  256. package/dist/config/definePlugin.d.ts +15 -0
  257. package/dist/config/definePlugin.js +45 -0
  258. package/dist/config/fastRefreshPlugin.d.ts +12 -0
  259. package/dist/config/fastRefreshPlugin.js +34 -0
  260. package/dist/config/ignorePlugin.d.ts +10 -0
  261. package/dist/config/ignorePlugin.js +27 -0
  262. package/dist/config/javaScriptRules.d.ts +14 -0
  263. package/dist/config/javaScriptRules.js +155 -0
  264. package/dist/config/miniCSSExtractPlugin.d.ts +10 -0
  265. package/dist/config/miniCSSExtractPlugin.js +34 -0
  266. package/dist/config/nodePolyfill.d.ts +10 -0
  267. package/dist/config/nodePolyfill.js +34 -0
  268. package/dist/config/progressPlugin.d.ts +11 -0
  269. package/dist/config/progressPlugin.js +27 -0
  270. package/dist/config/purgecssWebpackPlugin.d.ts +10 -0
  271. package/dist/config/purgecssWebpackPlugin.js +32 -0
  272. package/dist/config/speedMeasureWebpackPlugin.d.ts +6 -0
  273. package/dist/config/speedMeasureWebpackPlugin.js +34 -0
  274. package/dist/config/svgRules.d.ts +12 -0
  275. package/dist/config/svgRules.js +57 -0
  276. package/dist/constants.d.ts +11 -0
  277. package/dist/constants.js +15 -0
  278. package/dist/dev.d.ts +19 -0
  279. package/dist/dev.js +87 -0
  280. package/dist/index.d.ts +5 -0
  281. package/dist/index.js +16 -0
  282. package/dist/loader/svgr.d.ts +4 -0
  283. package/dist/loader/svgr.js +67 -0
  284. package/dist/plugins/ESBuildCSSMinifyPlugin.d.ts +11 -0
  285. package/dist/plugins/ESBuildCSSMinifyPlugin.js +65 -0
  286. package/dist/plugins/ProgressPlugin.d.ts +15 -0
  287. package/dist/plugins/ProgressPlugin.js +44 -0
  288. package/dist/plugins/_SamplePlugin.d.ts +9 -0
  289. package/dist/plugins/_SamplePlugin.js +14 -0
  290. package/dist/requireHook.d.ts +1 -0
  291. package/dist/requireHook.js +31 -0
  292. package/dist/schema.d.ts +3 -0
  293. package/dist/schema.js +72 -0
  294. package/dist/server/server.d.ts +16 -0
  295. package/dist/server/server.js +158 -0
  296. package/dist/server/ws.d.ts +8 -0
  297. package/dist/server/ws.js +42 -0
  298. package/dist/swcPlugins/autoCSSModules.d.ts +8 -0
  299. package/dist/swcPlugins/autoCSSModules.js +35 -0
  300. package/dist/swcPlugins/lockCoreJS.d.ts +6 -0
  301. package/dist/swcPlugins/lockCoreJS.js +23 -0
  302. package/dist/types.d.ts +100 -0
  303. package/dist/types.js +29 -0
  304. package/dist/utils/browsersList.d.ts +5 -0
  305. package/dist/utils/browsersList.js +10 -0
  306. package/dist/utils/depMatch.d.ts +6 -0
  307. package/dist/utils/depMatch.js +46 -0
  308. package/dist/utils/formatWebpackMessages.d.ts +12 -0
  309. package/dist/utils/formatWebpackMessages.js +100 -0
  310. package/package.json +171 -43
  311. package/bundled/css/hotModuleReplacement.js +0 -1203
  312. package/bundled/js/webpackHotDevClient.js +0 -13386
  313. package/lib/DevCompileDonePlugin.d.ts +0 -10
  314. package/lib/DevCompileDonePlugin.js +0 -53
  315. package/lib/cli.js +0 -184
  316. package/lib/getConfig/css.d.ts +0 -22
  317. package/lib/getConfig/css.js +0 -186
  318. package/lib/getConfig/getConfig.d.ts +0 -26
  319. package/lib/getConfig/getConfig.js +0 -578
  320. package/lib/getConfig/nodeModulesTransform.d.ts +0 -13
  321. package/lib/getConfig/nodeModulesTransform.js +0 -141
  322. package/lib/getConfig/pkgMatch.d.ts +0 -2
  323. package/lib/getConfig/pkgMatch.js +0 -58
  324. package/lib/getConfig/resolveDefine.d.ts +0 -5
  325. package/lib/getConfig/resolveDefine.js +0 -53
  326. package/lib/getConfig/runtimePublicPathEntry.d.ts +0 -1
  327. package/lib/getConfig/runtimePublicPathEntry.js +0 -3
  328. package/lib/getConfig/terserOptions.d.ts +0 -41
  329. package/lib/getConfig/terserOptions.js +0 -64
  330. package/lib/index.d.ts +0 -34
  331. package/lib/index.js +0 -314
  332. package/lib/requireHook.d.ts +0 -3
  333. package/lib/requireHook.js +0 -51
  334. package/lib/webpack/plugins/mini-css-extract-plugin/src/CssDependency.js +0 -94
  335. package/lib/webpack/plugins/mini-css-extract-plugin/src/CssDependencyTemplate.js +0 -26
  336. package/lib/webpack/plugins/mini-css-extract-plugin/src/CssLoadingRuntimeModule.js +0 -93
  337. package/lib/webpack/plugins/mini-css-extract-plugin/src/CssModule.js +0 -164
  338. package/lib/webpack/plugins/mini-css-extract-plugin/src/CssModuleFactory.js +0 -32
  339. package/lib/webpack/plugins/mini-css-extract-plugin/src/cjs.js +0 -15
  340. package/lib/webpack/plugins/mini-css-extract-plugin/src/index.js +0 -542
  341. package/lib/webpack/plugins/mini-css-extract-plugin/src/loader.js +0 -319
  342. package/lib/webpack/plugins/mini-css-extract-plugin/src/utils.js +0 -97
  343. package/lib/webpack/plugins/mini-css-extract-plugin.d.ts +0 -1
  344. package/lib/webpack/plugins/mini-css-extract-plugin.js +0 -15
  345. package/lib/webpack/plugins/terser-webpack-plugin/package.json +0 -3
  346. package/lib/webpack/plugins/terser-webpack-plugin/src/Webpack4Cache.js +0 -187
  347. package/lib/webpack/plugins/terser-webpack-plugin/src/Webpack5Cache.js +0 -61
  348. package/lib/webpack/plugins/terser-webpack-plugin/src/index.js +0 -683
  349. package/lib/webpack/plugins/terser-webpack-plugin/src/minify.js +0 -197
  350. package/lib/webpack/plugins/terser-webpack-plugin.d.ts +0 -1
  351. package/lib/webpack/plugins/terser-webpack-plugin.js +0 -15
  352. package/lib/webpackHotDevClient/formatWebpackMessages.d.ts +0 -11
  353. package/lib/webpackHotDevClient/formatWebpackMessages.js +0 -127
  354. package/lib/webpackHotDevClient/webpackHotDevClient.js +0 -311
@@ -0,0 +1,473 @@
1
+ import { SourceMapGenerator, RawSourceMap } from '../../source-map-js'
2
+
3
+ import Node, {
4
+ Position,
5
+ Source,
6
+ ChildNode,
7
+ NodeErrorOptions,
8
+ NodeProps,
9
+ ChildProps,
10
+ AnyNode
11
+ } from './node.js'
12
+ import Declaration, { DeclarationProps } from './declaration'
13
+ import Container, { ContainerProps } from './container'
14
+ import Document, { DocumentProps } from './document'
15
+ import Warning, { WarningOptions } from './warning'
16
+ import Comment, { CommentProps } from './comment'
17
+ import AtRule, { AtRuleProps } from './at-rule'
18
+ import Input, { FilePosition } from './input'
19
+ import Result, { Message } from './result'
20
+ import Root, { RootProps } from './root'
21
+ import Rule, { RuleProps } from './rule'
22
+ import CssSyntaxError from './css-syntax-error'
23
+ import list, { List } from './list'
24
+ import LazyResult from './lazy-result'
25
+ import Processor from './processor'
26
+
27
+ export {
28
+ NodeErrorOptions,
29
+ DeclarationProps,
30
+ CssSyntaxError,
31
+ ContainerProps,
32
+ WarningOptions,
33
+ DocumentProps,
34
+ FilePosition,
35
+ CommentProps,
36
+ AtRuleProps,
37
+ Declaration,
38
+ ChildProps,
39
+ LazyResult,
40
+ ChildNode,
41
+ NodeProps,
42
+ Processor,
43
+ RuleProps,
44
+ RootProps,
45
+ Container,
46
+ Position,
47
+ Document,
48
+ AnyNode,
49
+ Warning,
50
+ Message,
51
+ Comment,
52
+ Source,
53
+ AtRule,
54
+ Result,
55
+ Input,
56
+ Node,
57
+ list,
58
+ Rule,
59
+ Root
60
+ }
61
+
62
+ export type SourceMap = SourceMapGenerator & {
63
+ toJSON(): RawSourceMap
64
+ }
65
+
66
+ export type Helpers = { result: Result; postcss: Postcss } & Postcss
67
+
68
+ type DocumentProcessor = (
69
+ document: Document,
70
+ helper: Helpers
71
+ ) => Promise<void> | void
72
+ type RootProcessor = (root: Root, helper: Helpers) => Promise<void> | void
73
+ type DeclarationProcessor = (
74
+ decl: Declaration,
75
+ helper: Helpers
76
+ ) => Promise<void> | void
77
+ type RuleProcessor = (rule: Rule, helper: Helpers) => Promise<void> | void
78
+ type AtRuleProcessor = (atRule: AtRule, helper: Helpers) => Promise<void> | void
79
+ type CommentProcessor = (
80
+ comment: Comment,
81
+ helper: Helpers
82
+ ) => Promise<void> | void
83
+
84
+ interface Processors {
85
+ /**
86
+ * Will be called on `Document` node.
87
+ *
88
+ * Will be called again on children changes.
89
+ */
90
+ Document?: DocumentProcessor
91
+
92
+ /**
93
+ * Will be called on `Document` node, when all children will be processed.
94
+ *
95
+ * Will be called again on children changes.
96
+ */
97
+ DocumentExit?: DocumentProcessor
98
+
99
+ /**
100
+ * Will be called on `Root` node once.
101
+ */
102
+ Once?: RootProcessor
103
+
104
+ /**
105
+ * Will be called on `Root` node once, when all children will be processed.
106
+ */
107
+ OnceExit?: RootProcessor
108
+
109
+ /**
110
+ * Will be called on `Root` node.
111
+ *
112
+ * Will be called again on children changes.
113
+ */
114
+ Root?: RootProcessor
115
+
116
+ /**
117
+ * Will be called on `Root` node, when all children will be processed.
118
+ *
119
+ * Will be called again on children changes.
120
+ */
121
+ RootExit?: RootProcessor
122
+
123
+ /**
124
+ * Will be called on all `Declaration` nodes after listeners
125
+ * for `Declaration` event.
126
+ *
127
+ * Will be called again on node or children changes.
128
+ */
129
+ Declaration?: DeclarationProcessor | { [prop: string]: DeclarationProcessor }
130
+
131
+ /**
132
+ * Will be called on all `Declaration` nodes.
133
+ *
134
+ * Will be called again on node or children changes.
135
+ */
136
+ DeclarationExit?:
137
+ | DeclarationProcessor
138
+ | { [prop: string]: DeclarationProcessor }
139
+
140
+ /**
141
+ * Will be called on all `Rule` nodes.
142
+ *
143
+ * Will be called again on node or children changes.
144
+ */
145
+ Rule?: RuleProcessor
146
+
147
+ /**
148
+ * Will be called on all `Rule` nodes, when all children will be processed.
149
+ *
150
+ * Will be called again on node or children changes.
151
+ */
152
+ RuleExit?: RuleProcessor
153
+
154
+ /**
155
+ * Will be called on all`AtRule` nodes.
156
+ *
157
+ * Will be called again on node or children changes.
158
+ */
159
+ AtRule?: AtRuleProcessor | { [name: string]: AtRuleProcessor }
160
+
161
+ /**
162
+ * Will be called on all `AtRule` nodes, when all children will be processed.
163
+ *
164
+ * Will be called again on node or children changes.
165
+ */
166
+ AtRuleExit?: AtRuleProcessor | { [name: string]: AtRuleProcessor }
167
+
168
+ /**
169
+ * Will be called on all `Comment` nodes.
170
+ *
171
+ * Will be called again on node or children changes.
172
+ */
173
+ Comment?: CommentProcessor
174
+
175
+ /**
176
+ * Will be called on all `Comment` nodes after listeners
177
+ * for `Comment` event.
178
+ *
179
+ * Will be called again on node or children changes.
180
+ */
181
+ CommentExit?: CommentProcessor
182
+
183
+ /**
184
+ * Will be called when all other listeners processed the document.
185
+ *
186
+ * This listener will not be called again.
187
+ */
188
+ Exit?: RootProcessor
189
+ }
190
+
191
+ export interface Plugin extends Processors {
192
+ postcssPlugin: string
193
+ prepare?: (result: Result) => Processors
194
+ }
195
+
196
+ export interface PluginCreator<PluginOptions> {
197
+ (opts?: PluginOptions): Plugin | Processor
198
+ postcss: true
199
+ }
200
+
201
+ export interface Transformer extends TransformCallback {
202
+ postcssPlugin: string
203
+ postcssVersion: string
204
+ }
205
+
206
+ export interface TransformCallback {
207
+ (root: Root, result: Result): Promise<void> | void
208
+ }
209
+
210
+ export interface OldPlugin<T> extends Transformer {
211
+ (opts?: T): Transformer
212
+ postcss: Transformer
213
+ }
214
+
215
+ export type AcceptedPlugin =
216
+ | Plugin
217
+ | PluginCreator<any>
218
+ | OldPlugin<any>
219
+ | TransformCallback
220
+ | {
221
+ postcss: TransformCallback | Processor
222
+ }
223
+ | Processor
224
+
225
+ export interface Parser<RootNode = Root | Document> {
226
+ (
227
+ css: string | { toString(): string },
228
+ opts?: Pick<ProcessOptions, 'map' | 'from'>
229
+ ): RootNode
230
+ }
231
+
232
+ export interface Builder {
233
+ (part: string, node?: AnyNode, type?: 'start' | 'end'): void
234
+ }
235
+
236
+ export interface Stringifier {
237
+ (node: AnyNode, builder: Builder): void
238
+ }
239
+
240
+ export interface JSONHydrator {
241
+ (data: object[]): Node[]
242
+ (data: object): Node
243
+ }
244
+
245
+ export interface Syntax {
246
+ /**
247
+ * Function to generate AST by string.
248
+ */
249
+ parse?: Parser
250
+
251
+ /**
252
+ * Class to generate string by AST.
253
+ */
254
+ stringify?: Stringifier
255
+ }
256
+
257
+ export interface SourceMapOptions {
258
+ /**
259
+ * Indicates that the source map should be embedded in the output CSS
260
+ * as a Base64-encoded comment. By default, it is `true`.
261
+ * But if all previous maps are external, not inline, PostCSS will not embed
262
+ * the map even if you do not set this option.
263
+ *
264
+ * If you have an inline source map, the result.map property will be empty,
265
+ * as the source map will be contained within the text of `result.css`.
266
+ */
267
+ inline?: boolean
268
+
269
+ /**
270
+ * Source map content from a previous processing step (e.g., Sass).
271
+ *
272
+ * PostCSS will try to read the previous source map
273
+ * automatically (based on comments within the source CSS), but you can use
274
+ * this option to identify it manually.
275
+ *
276
+ * If desired, you can omit the previous map with prev: `false`.
277
+ */
278
+ prev?: string | boolean | object | ((file: string) => string)
279
+
280
+ /**
281
+ * Indicates that PostCSS should set the origin content (e.g., Sass source)
282
+ * of the source map. By default, it is true. But if all previous maps do not
283
+ * contain sources content, PostCSS will also leave it out even if you
284
+ * do not set this option.
285
+ */
286
+ sourcesContent?: boolean
287
+
288
+ /**
289
+ * Indicates that PostCSS should add annotation comments to the CSS.
290
+ * By default, PostCSS will always add a comment with a path
291
+ * to the source map. PostCSS will not add annotations to CSS files
292
+ * that do not contain any comments.
293
+ *
294
+ * By default, PostCSS presumes that you want to save the source map as
295
+ * `opts.to + '.map'` and will use this path in the annotation comment.
296
+ * A different path can be set by providing a string value for annotation.
297
+ *
298
+ * If you have set `inline: true`, annotation cannot be disabled.
299
+ */
300
+ annotation?: string | boolean | ((file: string, root: Root) => string)
301
+
302
+ /**
303
+ * Override `from` in map’s sources.
304
+ */
305
+ from?: string
306
+
307
+ /**
308
+ * Use absolute path in generated source map.
309
+ */
310
+ absolute?: boolean
311
+ }
312
+
313
+ export interface ProcessOptions {
314
+ /**
315
+ * The path of the CSS source file. You should always set `from`,
316
+ * because it is used in source map generation and syntax error messages.
317
+ */
318
+ from?: string
319
+
320
+ /**
321
+ * The path where you'll put the output CSS file. You should always set `to`
322
+ * to generate correct source maps.
323
+ */
324
+ to?: string
325
+
326
+ /**
327
+ * Function to generate AST by string.
328
+ */
329
+ parser?: Syntax | Parser
330
+
331
+ /**
332
+ * Class to generate string by AST.
333
+ */
334
+ stringifier?: Syntax | Stringifier
335
+
336
+ /**
337
+ * Object with parse and stringify.
338
+ */
339
+ syntax?: Syntax
340
+
341
+ /**
342
+ * Source map options
343
+ */
344
+ map?: SourceMapOptions | boolean
345
+ }
346
+
347
+ export interface Postcss {
348
+ /**
349
+ * Create a new `Processor` instance that will apply `plugins`
350
+ * as CSS processors.
351
+ *
352
+ * ```js
353
+ * let postcss = require('postcss')
354
+ *
355
+ * postcss(plugins).process(css, { from, to }).then(result => {
356
+ * console.log(result.css)
357
+ * })
358
+ * ```
359
+ *
360
+ * @param plugins PostCSS plugins.
361
+ * @return Processor to process multiple CSS.
362
+ */
363
+ (plugins?: AcceptedPlugin[]): Processor
364
+ (...plugins: AcceptedPlugin[]): Processor
365
+
366
+ /**
367
+ * Default function to convert a node tree into a CSS string.
368
+ */
369
+ stringify: Stringifier
370
+
371
+ /**
372
+ * Parses source css and returns a new `Root` or `Document` node,
373
+ * which contains the source CSS nodes.
374
+ *
375
+ * ```js
376
+ * // Simple CSS concatenation with source map support
377
+ * const root1 = postcss.parse(css1, { from: file1 })
378
+ * const root2 = postcss.parse(css2, { from: file2 })
379
+ * root1.append(root2).toResult().css
380
+ * ```
381
+ */
382
+ parse: Parser<Root>
383
+
384
+ /**
385
+ * Rehydrate a JSON AST (from `Node#toJSON`) back into the AST classes.
386
+ *
387
+ * ```js
388
+ * const json = root.toJSON()
389
+ * // save to file, send by network, etc
390
+ * const root2 = postcss.fromJSON(json)
391
+ * ```
392
+ */
393
+ fromJSON: JSONHydrator
394
+
395
+ /**
396
+ * Contains the `list` module.
397
+ */
398
+ list: List
399
+
400
+ /**
401
+ * Creates a new `Comment` node.
402
+ *
403
+ * @param defaults Properties for the new node.
404
+ * @return New comment node
405
+ */
406
+ comment(defaults?: CommentProps): Comment
407
+
408
+ /**
409
+ * Creates a new `AtRule` node.
410
+ *
411
+ * @param defaults Properties for the new node.
412
+ * @return New at-rule node.
413
+ */
414
+ atRule(defaults?: AtRuleProps): AtRule
415
+
416
+ /**
417
+ * Creates a new `Declaration` node.
418
+ *
419
+ * @param defaults Properties for the new node.
420
+ * @return New declaration node.
421
+ */
422
+ decl(defaults?: DeclarationProps): Declaration
423
+
424
+ /**
425
+ * Creates a new `Rule` node.
426
+ *
427
+ * @param default Properties for the new node.
428
+ * @return New rule node.
429
+ */
430
+ rule(defaults?: RuleProps): Rule
431
+
432
+ /**
433
+ * Creates a new `Root` node.
434
+ *
435
+ * @param defaults Properties for the new node.
436
+ * @return New root node.
437
+ */
438
+ root(defaults?: RootProps): Root
439
+
440
+ /**
441
+ * Creates a new `Document` node.
442
+ *
443
+ * @param defaults Properties for the new node.
444
+ * @return New document node.
445
+ */
446
+ document(defaults?: DocumentProps): Document
447
+
448
+ CssSyntaxError: typeof CssSyntaxError
449
+ Declaration: typeof Declaration
450
+ Container: typeof Container
451
+ Comment: typeof Comment
452
+ Warning: typeof Warning
453
+ AtRule: typeof AtRule
454
+ Result: typeof Result
455
+ Input: typeof Input
456
+ Rule: typeof Rule
457
+ Root: typeof Root
458
+ Node: typeof Node
459
+ }
460
+
461
+ export const stringify: Stringifier
462
+ export const parse: Parser<Root>
463
+ export const fromJSON: JSONHydrator
464
+
465
+ export const comment: Postcss['comment']
466
+ export const atRule: Postcss['atRule']
467
+ export const decl: Postcss['decl']
468
+ export const rule: Postcss['rule']
469
+ export const root: Postcss['root']
470
+
471
+ declare const postcss: Postcss
472
+
473
+ export default postcss
@@ -0,0 +1,72 @@
1
+ import { SourceMapConsumer } from '../../source-map-js'
2
+
3
+ import { ProcessOptions } from './postcss'
4
+
5
+ /**
6
+ * Source map information from input CSS.
7
+ * For example, source map after Sass compiler.
8
+ *
9
+ * This class will automatically find source map in input CSS or in file system
10
+ * near input file (according `from` option).
11
+ *
12
+ * ```js
13
+ * const root = parse(css, { from: 'a.sass.css' })
14
+ * root.input.map //=> PreviousMap
15
+ * ```
16
+ */
17
+ export default class PreviousMap {
18
+ /**
19
+ * Was source map inlined by data-uri to input CSS.
20
+ */
21
+ inline: boolean
22
+
23
+ /**
24
+ * `sourceMappingURL` content.
25
+ */
26
+ annotation?: string
27
+
28
+ /**
29
+ * Source map file content.
30
+ */
31
+ text?: string
32
+
33
+ /**
34
+ * The directory with source map file, if source map is in separated file.
35
+ */
36
+ root?: string
37
+
38
+ /**
39
+ * The CSS source identifier. Contains `Input#file` if the user
40
+ * set the `from` option, or `Input#id` if they did not.
41
+ */
42
+ file?: string
43
+
44
+ /**
45
+ * Path to source map file.
46
+ */
47
+ mapFile?: string
48
+
49
+ /**
50
+ * @param css Input CSS source.
51
+ * @param opts Process options.
52
+ */
53
+ constructor(css: string, opts?: ProcessOptions)
54
+
55
+ /**
56
+ * Create a instance of `SourceMapGenerator` class
57
+ * from the `source-map` library to work with source map information.
58
+ *
59
+ * It is lazy method, so it will create object only on first call
60
+ * and then it will use cache.
61
+ *
62
+ * @return Object with source map information.
63
+ */
64
+ consumer(): SourceMapConsumer
65
+
66
+ /**
67
+ * Does source map contains `sourcesContent` with input source text.
68
+ *
69
+ * @return Is `sourcesContent` present.
70
+ */
71
+ withContent(): boolean
72
+ }
@@ -0,0 +1,102 @@
1
+ import {
2
+ AcceptedPlugin,
3
+ Plugin,
4
+ ProcessOptions,
5
+ Transformer,
6
+ TransformCallback
7
+ } from './postcss.js'
8
+ import LazyResult from './lazy-result'
9
+ import Result from './result'
10
+ import Root from './root'
11
+ import NoWorkResult from './no-work-result'
12
+
13
+ /**
14
+ * Contains plugins to process CSS. Create one `Processor` instance,
15
+ * initialize its plugins, and then use that instance on numerous CSS files.
16
+ *
17
+ * ```js
18
+ * const processor = postcss([autoprefixer, postcssNested])
19
+ * processor.process(css1).then(result => console.log(result.css))
20
+ * processor.process(css2).then(result => console.log(result.css))
21
+ * ```
22
+ */
23
+ export default class Processor {
24
+ /**
25
+ * Current PostCSS version.
26
+ *
27
+ * ```js
28
+ * if (result.processor.version.split('.')[0] !== '6') {
29
+ * throw new Error('This plugin works only with PostCSS 6')
30
+ * }
31
+ * ```
32
+ */
33
+ version: string
34
+
35
+ /**
36
+ * Plugins added to this processor.
37
+ *
38
+ * ```js
39
+ * const processor = postcss([autoprefixer, postcssNested])
40
+ * processor.plugins.length //=> 2
41
+ * ```
42
+ */
43
+ plugins: (Plugin | Transformer | TransformCallback)[]
44
+
45
+ /**
46
+ * @param plugins PostCSS plugins
47
+ */
48
+ constructor(plugins?: AcceptedPlugin[])
49
+
50
+ /**
51
+ * Adds a plugin to be used as a CSS processor.
52
+ *
53
+ * PostCSS plugin can be in 4 formats:
54
+ * * A plugin in `Plugin` format.
55
+ * * A plugin creator function with `pluginCreator.postcss = true`.
56
+ * PostCSS will call this function without argument to get plugin.
57
+ * * A function. PostCSS will pass the function a @{link Root}
58
+ * as the first argument and current `Result` instance
59
+ * as the second.
60
+ * * Another `Processor` instance. PostCSS will copy plugins
61
+ * from that instance into this one.
62
+ *
63
+ * Plugins can also be added by passing them as arguments when creating
64
+ * a `postcss` instance (see [`postcss(plugins)`]).
65
+ *
66
+ * Asynchronous plugins should return a `Promise` instance.
67
+ *
68
+ * ```js
69
+ * const processor = postcss()
70
+ * .use(autoprefixer)
71
+ * .use(postcssNested)
72
+ * ```
73
+ *
74
+ * @param plugin PostCSS plugin or `Processor` with plugins.
75
+ * @return {Processes} Current processor to make methods chain.
76
+ */
77
+ use(plugin: AcceptedPlugin): this
78
+
79
+ /**
80
+ * Parses source CSS and returns a `LazyResult` Promise proxy.
81
+ * Because some plugins can be asynchronous it doesn’t make
82
+ * any transformations. Transformations will be applied
83
+ * in the `LazyResult` methods.
84
+ *
85
+ * ```js
86
+ * processor.process(css, { from: 'a.css', to: 'a.out.css' })
87
+ * .then(result => {
88
+ * console.log(result.css)
89
+ * })
90
+ * ```
91
+ *
92
+ * @param css String with input CSS or any object with a `toString()` method,
93
+ * like a Buffer. Optionally, senda `Result` instance
94
+ * and the processor will take the `Root` from it.
95
+ * @param opts Options.
96
+ * @return Promise proxy.
97
+ */
98
+ process(
99
+ css: string | { toString(): string } | Result | LazyResult | Root,
100
+ options?: ProcessOptions
101
+ ): LazyResult | NoWorkResult
102
+ }