config-utils.js 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.loadWebpackHook = loadWebpackHook;
  6. var _webpack = require("next/dist/compiled/webpack/webpack");
  7. let installed = false;
  8. function loadWebpackHook() {
  9. if (installed) {
  10. return;
  11. }
  12. installed = true;
  13. (0, _webpack).init();
  14. // hook the Node.js require so that webpack requires are
  15. // routed to the bundled and now initialized webpack version
  16. require("../build/webpack/require-hook").default([
  17. [
  18. "webpack",
  19. "next/dist/compiled/webpack/webpack-lib"
  20. ],
  21. [
  22. "webpack/package",
  23. "next/dist/compiled/webpack/package"
  24. ],
  25. [
  26. "webpack/package.json",
  27. "next/dist/compiled/webpack/package"
  28. ],
  29. [
  30. "webpack/lib/webpack",
  31. "next/dist/compiled/webpack/webpack-lib"
  32. ],
  33. [
  34. "webpack/lib/webpack.js",
  35. "next/dist/compiled/webpack/webpack-lib"
  36. ],
  37. [
  38. "webpack/lib/node/NodeEnvironmentPlugin",
  39. "next/dist/compiled/webpack/NodeEnvironmentPlugin",
  40. ],
  41. [
  42. "webpack/lib/node/NodeEnvironmentPlugin.js",
  43. "next/dist/compiled/webpack/NodeEnvironmentPlugin",
  44. ],
  45. [
  46. "webpack/lib/BasicEvaluatedExpression",
  47. "next/dist/compiled/webpack/BasicEvaluatedExpression",
  48. ],
  49. [
  50. "webpack/lib/BasicEvaluatedExpression.js",
  51. "next/dist/compiled/webpack/BasicEvaluatedExpression",
  52. ],
  53. [
  54. "webpack/lib/node/NodeTargetPlugin",
  55. "next/dist/compiled/webpack/NodeTargetPlugin",
  56. ],
  57. [
  58. "webpack/lib/node/NodeTargetPlugin.js",
  59. "next/dist/compiled/webpack/NodeTargetPlugin",
  60. ],
  61. [
  62. "webpack/lib/node/NodeTemplatePlugin",
  63. "next/dist/compiled/webpack/NodeTemplatePlugin",
  64. ],
  65. [
  66. "webpack/lib/node/NodeTemplatePlugin.js",
  67. "next/dist/compiled/webpack/NodeTemplatePlugin",
  68. ],
  69. [
  70. "webpack/lib/LibraryTemplatePlugin",
  71. "next/dist/compiled/webpack/LibraryTemplatePlugin",
  72. ],
  73. [
  74. "webpack/lib/LibraryTemplatePlugin.js",
  75. "next/dist/compiled/webpack/LibraryTemplatePlugin",
  76. ],
  77. [
  78. "webpack/lib/SingleEntryPlugin",
  79. "next/dist/compiled/webpack/SingleEntryPlugin",
  80. ],
  81. [
  82. "webpack/lib/SingleEntryPlugin.js",
  83. "next/dist/compiled/webpack/SingleEntryPlugin",
  84. ],
  85. [
  86. "webpack/lib/optimize/LimitChunkCountPlugin",
  87. "next/dist/compiled/webpack/LimitChunkCountPlugin",
  88. ],
  89. [
  90. "webpack/lib/optimize/LimitChunkCountPlugin.js",
  91. "next/dist/compiled/webpack/LimitChunkCountPlugin",
  92. ],
  93. [
  94. "webpack/lib/webworker/WebWorkerTemplatePlugin",
  95. "next/dist/compiled/webpack/WebWorkerTemplatePlugin",
  96. ],
  97. [
  98. "webpack/lib/webworker/WebWorkerTemplatePlugin.js",
  99. "next/dist/compiled/webpack/WebWorkerTemplatePlugin",
  100. ],
  101. [
  102. "webpack/lib/ExternalsPlugin",
  103. "next/dist/compiled/webpack/ExternalsPlugin",
  104. ],
  105. [
  106. "webpack/lib/ExternalsPlugin.js",
  107. "next/dist/compiled/webpack/ExternalsPlugin",
  108. ],
  109. [
  110. "webpack/lib/web/FetchCompileWasmTemplatePlugin",
  111. "next/dist/compiled/webpack/FetchCompileWasmTemplatePlugin",
  112. ],
  113. [
  114. "webpack/lib/web/FetchCompileWasmTemplatePlugin.js",
  115. "next/dist/compiled/webpack/FetchCompileWasmTemplatePlugin",
  116. ],
  117. [
  118. "webpack/lib/web/FetchCompileWasmPlugin",
  119. "next/dist/compiled/webpack/FetchCompileWasmPlugin",
  120. ],
  121. [
  122. "webpack/lib/web/FetchCompileWasmPlugin.js",
  123. "next/dist/compiled/webpack/FetchCompileWasmPlugin",
  124. ],
  125. [
  126. "webpack/lib/web/FetchCompileAsyncWasmPlugin",
  127. "next/dist/compiled/webpack/FetchCompileAsyncWasmPlugin",
  128. ],
  129. [
  130. "webpack/lib/web/FetchCompileAsyncWasmPlugin.js",
  131. "next/dist/compiled/webpack/FetchCompileAsyncWasmPlugin",
  132. ],
  133. [
  134. "webpack/lib/ModuleFilenameHelpers",
  135. "next/dist/compiled/webpack/ModuleFilenameHelpers",
  136. ],
  137. [
  138. "webpack/lib/ModuleFilenameHelpers.js",
  139. "next/dist/compiled/webpack/ModuleFilenameHelpers",
  140. ],
  141. [
  142. "webpack/lib/GraphHelpers",
  143. "next/dist/compiled/webpack/GraphHelpers"
  144. ],
  145. [
  146. "webpack/lib/GraphHelpers.js",
  147. "next/dist/compiled/webpack/GraphHelpers",
  148. ],
  149. [
  150. "webpack/lib/NormalModule",
  151. "next/dist/compiled/webpack/NormalModule"
  152. ],
  153. [
  154. "webpack-sources",
  155. "next/dist/compiled/webpack/sources"
  156. ],
  157. [
  158. "webpack-sources/lib",
  159. "next/dist/compiled/webpack/sources"
  160. ],
  161. [
  162. "webpack-sources/lib/index",
  163. "next/dist/compiled/webpack/sources"
  164. ],
  165. [
  166. "webpack-sources/lib/index.js",
  167. "next/dist/compiled/webpack/sources"
  168. ],
  169. [
  170. "@babel/runtime",
  171. "next/dist/compiled/@babel/runtime/package.json"
  172. ],
  173. [
  174. "@babel/runtime/package.json",
  175. "next/dist/compiled/@babel/runtime/package.json",
  176. ],
  177. [
  178. "node-fetch",
  179. "next/dist/compiled/node-fetch"
  180. ],
  181. ].map(// Use dynamic require.resolve to avoid statically analyzable since they're only for build time
  182. ([request, replacement])=>[
  183. request,
  184. require.resolve(replacement)
  185. ]));
  186. }
  187. //# sourceMappingURL=config-utils.js.map