vite-plugin-react-server 1.0.3 → 1.1.1

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 (488) hide show
  1. package/README.md +48 -75
  2. package/bin/patch.mjs +27 -12
  3. package/dist/_virtual/dynamic-import-helper.js +24 -0
  4. package/dist/_virtual/dynamic-import-helper.js.map +1 -0
  5. package/dist/client.d.ts +1 -1
  6. package/dist/client.d.ts.map +1 -1
  7. package/dist/client.js +1 -1
  8. package/dist/index.d.ts +2 -4
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js +9 -26
  11. package/dist/index.js.map +1 -1
  12. package/dist/package.json +24 -14
  13. package/dist/plugin/components.d.ts +1 -1
  14. package/dist/plugin/components.d.ts.map +1 -1
  15. package/dist/plugin/components.js +1 -1
  16. package/dist/plugin/config/autoDiscover/createGlobAutoDiscover.d.ts +6 -0
  17. package/dist/plugin/config/autoDiscover/createGlobAutoDiscover.d.ts.map +1 -0
  18. package/dist/plugin/config/autoDiscover/createGlobAutoDiscover.js +30 -0
  19. package/dist/plugin/config/autoDiscover/createGlobAutoDiscover.js.map +1 -0
  20. package/dist/plugin/config/autoDiscover/customWorkerFiles.d.ts +13 -0
  21. package/dist/plugin/config/autoDiscover/customWorkerFiles.d.ts.map +1 -0
  22. package/dist/plugin/config/autoDiscover/customWorkerFiles.js +24 -0
  23. package/dist/plugin/config/autoDiscover/customWorkerFiles.js.map +1 -0
  24. package/dist/plugin/config/autoDiscover/pageAndPropFiles.d.ts +11 -0
  25. package/dist/plugin/config/autoDiscover/pageAndPropFiles.d.ts.map +1 -0
  26. package/dist/plugin/config/autoDiscover/pageAndPropFiles.js +29 -0
  27. package/dist/plugin/config/autoDiscover/pageAndPropFiles.js.map +1 -0
  28. package/dist/plugin/config/autoDiscover/resolveBuildPages.d.ts +6 -0
  29. package/dist/plugin/config/autoDiscover/resolveBuildPages.d.ts.map +1 -0
  30. package/dist/plugin/config/autoDiscover/resolveBuildPages.js +83 -0
  31. package/dist/plugin/config/autoDiscover/resolveBuildPages.js.map +1 -0
  32. package/dist/plugin/config/defaults.d.ts +18 -14
  33. package/dist/plugin/config/defaults.d.ts.map +1 -1
  34. package/dist/plugin/config/defaults.js +42 -21
  35. package/dist/plugin/config/defaults.js.map +1 -1
  36. package/dist/plugin/config/getCondition.d.ts +1 -1
  37. package/dist/plugin/config/getCondition.d.ts.map +1 -1
  38. package/dist/plugin/config/getCondition.js +2 -2
  39. package/dist/plugin/config/getCondition.js.map +1 -1
  40. package/dist/plugin/config/getPaths.d.ts +0 -1
  41. package/dist/plugin/config/getPaths.d.ts.map +1 -1
  42. package/dist/plugin/config/getPaths.js.map +1 -1
  43. package/dist/plugin/config/index.d.ts +0 -1
  44. package/dist/plugin/config/index.d.ts.map +1 -1
  45. package/dist/plugin/config/index.js +0 -1
  46. package/dist/plugin/config/resolveAutoDiscover.d.ts +20 -0
  47. package/dist/plugin/config/resolveAutoDiscover.d.ts.map +1 -0
  48. package/dist/plugin/config/resolveAutoDiscover.js +128 -0
  49. package/dist/plugin/config/resolveAutoDiscover.js.map +1 -0
  50. package/dist/plugin/config/resolveOptions.d.ts +1 -1
  51. package/dist/plugin/config/resolveOptions.d.ts.map +1 -1
  52. package/dist/plugin/config/resolveOptions.js +109 -77
  53. package/dist/plugin/config/resolveOptions.js.map +1 -1
  54. package/dist/plugin/config/resolvePages.d.ts +0 -1
  55. package/dist/plugin/config/resolvePages.d.ts.map +1 -1
  56. package/dist/plugin/config/resolvePages.js +6 -8
  57. package/dist/plugin/config/resolvePages.js.map +1 -1
  58. package/dist/plugin/config/resolveUrlOption.d.ts +16 -0
  59. package/dist/plugin/config/resolveUrlOption.d.ts.map +1 -0
  60. package/dist/plugin/config/resolveUrlOption.js +37 -0
  61. package/dist/plugin/config/resolveUrlOption.js.map +1 -0
  62. package/dist/plugin/config/resolveUserConfig.d.ts +4 -5
  63. package/dist/plugin/config/resolveUserConfig.d.ts.map +1 -1
  64. package/dist/plugin/config/resolveUserConfig.js +80 -132
  65. package/dist/plugin/config/resolveUserConfig.js.map +1 -1
  66. package/dist/plugin/copy.d.ts +7 -0
  67. package/dist/plugin/copy.d.ts.map +1 -0
  68. package/dist/plugin/copy.js +30 -0
  69. package/dist/plugin/css-collector-elements.d.ts +4 -0
  70. package/dist/plugin/css-collector-elements.d.ts.map +1 -0
  71. package/dist/plugin/css-collector-elements.js +19 -0
  72. package/dist/plugin/css-collector-elements.js.map +1 -0
  73. package/dist/plugin/css-collector.d.ts +2 -8
  74. package/dist/plugin/css-collector.d.ts.map +1 -1
  75. package/dist/plugin/css-collector.js +9 -36
  76. package/dist/plugin/css-collector.js.map +1 -1
  77. package/dist/plugin/helpers/cleanObject.d.ts +3 -0
  78. package/dist/plugin/helpers/cleanObject.d.ts.map +1 -0
  79. package/dist/plugin/helpers/cleanObject.js +47 -0
  80. package/dist/plugin/helpers/cleanObject.js.map +1 -0
  81. package/dist/plugin/helpers/collectBundleManifestCss.d.ts +8 -0
  82. package/dist/plugin/helpers/collectBundleManifestCss.d.ts.map +1 -0
  83. package/dist/plugin/helpers/collectBundleManifestCss.js +110 -0
  84. package/dist/plugin/helpers/collectManifestCss.d.ts +7 -0
  85. package/dist/plugin/helpers/collectManifestCss.d.ts.map +1 -0
  86. package/dist/plugin/helpers/collectManifestCss.js +44 -0
  87. package/dist/plugin/helpers/collectManifestCss.js.map +1 -0
  88. package/dist/plugin/helpers/collectViteModuleGraphCss.d.ts +31 -0
  89. package/dist/plugin/helpers/collectViteModuleGraphCss.d.ts.map +1 -0
  90. package/dist/plugin/helpers/collectViteModuleGraphCss.js +104 -0
  91. package/dist/plugin/helpers/collectViteModuleGraphCss.js.map +1 -0
  92. package/dist/plugin/helpers/createCssProps.d.ts +25 -0
  93. package/dist/plugin/helpers/createCssProps.d.ts.map +1 -0
  94. package/dist/plugin/helpers/createCssProps.js +57 -0
  95. package/dist/plugin/helpers/createCssProps.js.map +1 -0
  96. package/dist/plugin/helpers/createEventHandler.d.ts +22 -0
  97. package/dist/plugin/helpers/createEventHandler.d.ts.map +1 -0
  98. package/dist/plugin/helpers/createEventHandler.js +36 -0
  99. package/dist/plugin/helpers/createEventHandler.js.map +1 -0
  100. package/dist/plugin/helpers/createHandler.d.ts +7 -13
  101. package/dist/plugin/helpers/createHandler.d.ts.map +1 -1
  102. package/dist/plugin/helpers/createHandler.js +54 -96
  103. package/dist/plugin/helpers/createHandler.js.map +1 -1
  104. package/dist/plugin/helpers/createRscStream.d.ts +12 -26
  105. package/dist/plugin/helpers/createRscStream.d.ts.map +1 -1
  106. package/dist/plugin/helpers/createRscStream.js +105 -51
  107. package/dist/plugin/helpers/createRscStream.js.map +1 -1
  108. package/dist/plugin/helpers/defaultFileWriter.d.ts +2 -0
  109. package/dist/plugin/helpers/defaultFileWriter.d.ts.map +1 -0
  110. package/dist/plugin/helpers/defaultFileWriter.js +1 -0
  111. package/dist/plugin/helpers/getBundleManifest.d.ts +10 -16
  112. package/dist/plugin/helpers/getBundleManifest.d.ts.map +1 -1
  113. package/dist/plugin/helpers/getBundleManifest.js +30 -22
  114. package/dist/plugin/helpers/getBundleManifest.js.map +1 -1
  115. package/dist/plugin/helpers/getRouteFiles.d.ts +14 -0
  116. package/dist/plugin/helpers/getRouteFiles.d.ts.map +1 -0
  117. package/dist/plugin/helpers/getRouteFiles.js +36 -0
  118. package/dist/plugin/helpers/getRouteFiles.js.map +1 -0
  119. package/dist/plugin/helpers/inputNormalizer.d.ts.map +1 -1
  120. package/dist/plugin/helpers/inputNormalizer.js +38 -32
  121. package/dist/plugin/helpers/inputNormalizer.js.map +1 -1
  122. package/dist/plugin/helpers/metrics.d.ts +11 -0
  123. package/dist/plugin/helpers/metrics.d.ts.map +1 -0
  124. package/dist/plugin/helpers/metrics.js +35 -0
  125. package/dist/plugin/helpers/metrics.js.map +1 -0
  126. package/dist/plugin/helpers/resolvePageAndProps.d.ts +27 -0
  127. package/dist/plugin/helpers/resolvePageAndProps.d.ts.map +1 -0
  128. package/dist/plugin/helpers/resolvePageAndProps.js +51 -0
  129. package/dist/plugin/helpers/resolvePageAndProps.js.map +1 -0
  130. package/dist/plugin/helpers/serializeUserOptions.d.ts +8 -0
  131. package/dist/plugin/helpers/serializeUserOptions.d.ts.map +1 -0
  132. package/dist/plugin/helpers/serializeUserOptions.js +182 -0
  133. package/dist/plugin/helpers/serializeUserOptions.js.map +1 -0
  134. package/dist/plugin/helpers/stashReturnValue.d.ts +2 -0
  135. package/dist/plugin/helpers/stashReturnValue.d.ts.map +1 -0
  136. package/dist/plugin/helpers/stashReturnValue.js +14 -0
  137. package/dist/plugin/helpers/tryManifest.d.ts +5 -3
  138. package/dist/plugin/helpers/tryManifest.d.ts.map +1 -1
  139. package/dist/plugin/helpers/tryManifest.js +16 -7
  140. package/dist/plugin/helpers/tryManifest.js.map +1 -1
  141. package/dist/plugin/html.d.ts +2 -3
  142. package/dist/plugin/html.d.ts.map +1 -1
  143. package/dist/plugin/html.js +7 -1
  144. package/dist/plugin/html.js.map +1 -1
  145. package/dist/plugin/index.d.ts +1 -2
  146. package/dist/plugin/index.d.ts.map +1 -1
  147. package/dist/plugin/index.js +3 -1
  148. package/dist/plugin/loader/createBuildLoader.d.ts +26 -4
  149. package/dist/plugin/loader/createBuildLoader.d.ts.map +1 -1
  150. package/dist/plugin/loader/createBuildLoader.js +98 -33
  151. package/dist/plugin/loader/createBuildLoader.js.map +1 -1
  152. package/dist/plugin/loader/css-loader.development.d.ts +57 -0
  153. package/dist/plugin/loader/css-loader.development.d.ts.map +1 -0
  154. package/dist/plugin/loader/css-loader.development.js +81 -0
  155. package/dist/plugin/loader/css-loader.development.js.map +1 -0
  156. package/dist/plugin/loader/css-loader.production.d.ts +31 -0
  157. package/dist/plugin/loader/css-loader.production.d.ts.map +1 -0
  158. package/dist/plugin/loader/css-loader.production.js +45 -0
  159. package/dist/plugin/loader/css-loader.production.js.map +1 -0
  160. package/dist/plugin/loader/index.d.ts +2 -0
  161. package/dist/plugin/loader/index.d.ts.map +1 -0
  162. package/dist/plugin/loader/index.js +1 -0
  163. package/dist/plugin/loader/plugin.d.ts +22 -0
  164. package/dist/plugin/loader/plugin.d.ts.map +1 -0
  165. package/dist/plugin/loader/plugin.js +27 -0
  166. package/dist/plugin/loader/react-loader.d.ts +3 -7
  167. package/dist/plugin/loader/react-loader.d.ts.map +1 -1
  168. package/dist/plugin/loader/react-loader.js +85 -30
  169. package/dist/plugin/loader/react-loader.js.map +1 -1
  170. package/dist/plugin/loader/temporaryReferences.d.ts +2 -0
  171. package/dist/plugin/loader/temporaryReferences.d.ts.map +1 -0
  172. package/dist/plugin/loader/temporaryReferences.js +11 -0
  173. package/dist/plugin/loader/temporaryReferences.js.map +1 -0
  174. package/dist/plugin/moduleRefs.d.ts +7 -0
  175. package/dist/plugin/moduleRefs.d.ts.map +1 -0
  176. package/dist/plugin/moduleRefs.js +17 -0
  177. package/dist/plugin/moduleRefs.js.map +1 -0
  178. package/dist/plugin/plugin.client.d.ts +3 -0
  179. package/dist/plugin/plugin.client.d.ts.map +1 -0
  180. package/dist/plugin/plugin.client.js +19 -0
  181. package/dist/plugin/plugin.client.js.map +1 -0
  182. package/dist/plugin/plugin.d.ts +1 -5
  183. package/dist/plugin/plugin.d.ts.map +1 -1
  184. package/dist/plugin/plugin.js +3 -9
  185. package/dist/plugin/plugin.server.d.ts +3 -0
  186. package/dist/plugin/plugin.server.d.ts.map +1 -0
  187. package/dist/plugin/plugin.server.js +28 -0
  188. package/dist/plugin/plugin.server.js.map +1 -0
  189. package/dist/plugin/preserver/plugin.js +1 -1
  190. package/dist/plugin/preserver/plugin.js.map +1 -1
  191. package/dist/plugin/react-client/index.d.ts +1 -2
  192. package/dist/plugin/react-client/index.d.ts.map +1 -1
  193. package/dist/plugin/react-client/index.js +1 -19
  194. package/dist/plugin/react-client/plugin.d.ts.map +1 -1
  195. package/dist/plugin/react-client/plugin.js +60 -219
  196. package/dist/plugin/react-client/plugin.js.map +1 -1
  197. package/dist/plugin/react-client/server.d.ts +27 -0
  198. package/dist/plugin/react-client/server.d.ts.map +1 -0
  199. package/dist/plugin/react-client/server.js +197 -0
  200. package/dist/plugin/react-client/server.js.map +1 -0
  201. package/dist/plugin/react-server/index.d.ts +1 -2
  202. package/dist/plugin/react-server/index.d.ts.map +1 -1
  203. package/dist/plugin/react-server/index.js +1 -21
  204. package/dist/plugin/react-server/plugin.d.ts +0 -1
  205. package/dist/plugin/react-server/plugin.d.ts.map +1 -1
  206. package/dist/plugin/react-server/plugin.js +60 -186
  207. package/dist/plugin/react-server/plugin.js.map +1 -1
  208. package/dist/plugin/react-server/server.d.ts +9 -0
  209. package/dist/plugin/react-server/server.d.ts.map +1 -0
  210. package/dist/plugin/react-server/server.js +120 -0
  211. package/dist/plugin/react-server/server.js.map +1 -0
  212. package/dist/plugin/react-static/collectHtmlWorkerContent.d.ts +23 -0
  213. package/dist/plugin/react-static/collectHtmlWorkerContent.d.ts.map +1 -0
  214. package/dist/plugin/react-static/collectHtmlWorkerContent.js +85 -0
  215. package/dist/plugin/react-static/collectHtmlWorkerContent.js.map +1 -0
  216. package/dist/plugin/react-static/collectRscContent.d.ts +24 -0
  217. package/dist/plugin/react-static/collectRscContent.d.ts.map +1 -0
  218. package/dist/plugin/react-static/collectRscContent.js +49 -0
  219. package/dist/plugin/react-static/collectRscContent.js.map +1 -0
  220. package/dist/plugin/react-static/configurePreviewServer.d.ts +7 -0
  221. package/dist/plugin/react-static/configurePreviewServer.d.ts.map +1 -0
  222. package/dist/plugin/react-static/configurePreviewServer.js +67 -0
  223. package/dist/plugin/react-static/configurePreviewServer.js.map +1 -0
  224. package/dist/plugin/react-static/fileWriter.d.ts +23 -0
  225. package/dist/plugin/react-static/fileWriter.d.ts.map +1 -0
  226. package/dist/plugin/react-static/fileWriter.js +65 -0
  227. package/dist/plugin/react-static/fileWriter.js.map +1 -0
  228. package/dist/plugin/react-static/plugin.d.ts +15 -0
  229. package/dist/plugin/react-static/plugin.d.ts.map +1 -1
  230. package/dist/plugin/react-static/plugin.js +248 -149
  231. package/dist/plugin/react-static/plugin.js.map +1 -1
  232. package/dist/plugin/react-static/renderPage.d.ts +3 -0
  233. package/dist/plugin/react-static/renderPage.d.ts.map +1 -0
  234. package/dist/plugin/react-static/renderPage.js +116 -0
  235. package/dist/plugin/react-static/renderPage.js.map +1 -0
  236. package/dist/plugin/react-static/renderPages.d.ts +3 -0
  237. package/dist/plugin/react-static/renderPages.d.ts.map +1 -0
  238. package/dist/plugin/react-static/renderPages.js +125 -0
  239. package/dist/plugin/react-static/renderPages.js.map +1 -0
  240. package/dist/plugin/react-static/renderStreams.d.ts +26 -0
  241. package/dist/plugin/react-static/renderStreams.d.ts.map +1 -0
  242. package/dist/plugin/react-static/renderStreams.js +27 -0
  243. package/dist/plugin/react-static/renderStreams.js.map +1 -0
  244. package/dist/plugin/react-static/rscToHtmlStream.d.ts +22 -0
  245. package/dist/plugin/react-static/rscToHtmlStream.d.ts.map +1 -0
  246. package/dist/plugin/react-static/rscToHtmlStream.js +54 -0
  247. package/dist/plugin/react-static/rscToHtmlStream.js.map +1 -0
  248. package/dist/plugin/react-static/streamHandler.d.ts +2 -0
  249. package/dist/plugin/react-static/streamHandler.d.ts.map +1 -0
  250. package/dist/plugin/react-static/streamHandler.js +1 -0
  251. package/dist/plugin/react-static/types.d.ts +11 -0
  252. package/dist/plugin/react-static/types.d.ts.map +1 -1
  253. package/dist/plugin/resolvePage.d.ts +26 -9
  254. package/dist/plugin/resolvePage.d.ts.map +1 -1
  255. package/dist/plugin/resolvePage.js +41 -39
  256. package/dist/plugin/resolvePage.js.map +1 -1
  257. package/dist/plugin/resolveProps.d.ts +40 -7
  258. package/dist/plugin/resolveProps.d.ts.map +1 -1
  259. package/dist/plugin/resolveProps.js +100 -75
  260. package/dist/plugin/resolveProps.js.map +1 -1
  261. package/dist/plugin/root.d.ts +1 -0
  262. package/dist/plugin/root.d.ts.map +1 -1
  263. package/dist/plugin/root.js +1 -0
  264. package/dist/plugin/root.js.map +1 -1
  265. package/dist/plugin/transformer/index.d.ts +2 -1
  266. package/dist/plugin/transformer/index.d.ts.map +1 -1
  267. package/dist/plugin/transformer/index.js +2 -1
  268. package/dist/plugin/transformer/plugin.client.d.ts +4 -0
  269. package/dist/plugin/transformer/plugin.client.d.ts.map +1 -0
  270. package/dist/plugin/transformer/plugin.client.js +83 -0
  271. package/dist/plugin/transformer/plugin.client.js.map +1 -0
  272. package/dist/plugin/transformer/plugin.d.ts +1 -27
  273. package/dist/plugin/transformer/plugin.d.ts.map +1 -1
  274. package/dist/plugin/transformer/plugin.js +3 -87
  275. package/dist/plugin/transformer/plugin.js.map +1 -1
  276. package/dist/plugin/transformer/plugin.server.d.ts +4 -0
  277. package/dist/plugin/transformer/plugin.server.d.ts.map +1 -0
  278. package/dist/plugin/transformer/plugin.server.js +76 -0
  279. package/dist/plugin/transformer/plugin.server.js.map +1 -0
  280. package/dist/plugin/transformer/upgradeCssModuleCode.d.ts +11 -0
  281. package/dist/plugin/transformer/upgradeCssModuleCode.d.ts.map +1 -0
  282. package/dist/plugin/transformer/upgradeCssModuleCode.js +38 -0
  283. package/dist/plugin/types/css-tracking.d.ts +6 -0
  284. package/dist/plugin/types/css-tracking.d.ts.map +1 -0
  285. package/dist/plugin/types/css-tracking.js +1 -0
  286. package/dist/plugin/types.d.ts +372 -86
  287. package/dist/plugin/types.d.ts.map +1 -1
  288. package/dist/plugin/types.js +1 -1
  289. package/dist/plugin/vendor.client.d.ts +4 -0
  290. package/dist/plugin/vendor.client.d.ts.map +1 -0
  291. package/dist/plugin/vendor.client.js +16 -0
  292. package/dist/plugin/vendor.client.js.map +1 -0
  293. package/dist/plugin/vendor.server.d.ts +4 -0
  294. package/dist/plugin/vendor.server.d.ts.map +1 -0
  295. package/dist/plugin/vendor.server.js +16 -0
  296. package/dist/plugin/vendor.server.js.map +1 -0
  297. package/dist/plugin/worker/createWorker.d.ts +25 -7
  298. package/dist/plugin/worker/createWorker.d.ts.map +1 -1
  299. package/dist/plugin/worker/createWorker.js +108 -33
  300. package/dist/plugin/worker/createWorker.js.map +1 -1
  301. package/dist/plugin/worker/html/createHtmlWorkerRenderState.d.ts +12 -0
  302. package/dist/plugin/worker/html/createHtmlWorkerRenderState.d.ts.map +1 -0
  303. package/dist/plugin/worker/html/createHtmlWorkerRenderState.js +103 -0
  304. package/dist/plugin/worker/html/createHtmlWorkerRenderState.js.map +1 -0
  305. package/dist/plugin/worker/html/html-worker.development.d.ts +0 -30
  306. package/dist/plugin/worker/html/html-worker.development.d.ts.map +1 -1
  307. package/dist/plugin/worker/html/html-worker.development.js +3 -17
  308. package/dist/plugin/worker/html/html-worker.development.js.map +1 -1
  309. package/dist/plugin/worker/html/html-worker.production.js +12 -5
  310. package/dist/plugin/worker/html/html-worker.production.js.map +1 -1
  311. package/dist/plugin/worker/html/messageHandler.d.ts +2 -2
  312. package/dist/plugin/worker/html/messageHandler.d.ts.map +1 -1
  313. package/dist/plugin/worker/html/messageHandler.js +87 -84
  314. package/dist/plugin/worker/html/messageHandler.js.map +1 -1
  315. package/dist/plugin/worker/html/types.d.ts +18 -0
  316. package/dist/plugin/worker/html/types.d.ts.map +1 -0
  317. package/dist/plugin/worker/html/types.js +1 -0
  318. package/dist/plugin/worker/registerLoaders.d.ts +9 -0
  319. package/dist/plugin/worker/registerLoaders.d.ts.map +1 -0
  320. package/dist/plugin/worker/registerLoaders.js +45 -0
  321. package/dist/plugin/worker/rsc/handleRender.d.ts +4 -0
  322. package/dist/plugin/worker/rsc/handleRender.d.ts.map +1 -0
  323. package/dist/plugin/worker/rsc/handleRender.js +147 -0
  324. package/dist/plugin/worker/rsc/handleRender.js.map +1 -0
  325. package/dist/plugin/worker/rsc/messageHandler.d.ts +2 -2
  326. package/dist/plugin/worker/rsc/messageHandler.d.ts.map +1 -1
  327. package/dist/plugin/worker/rsc/messageHandler.js +47 -112
  328. package/dist/plugin/worker/rsc/messageHandler.js.map +1 -1
  329. package/dist/plugin/worker/rsc/rsc-worker.development.d.ts +0 -30
  330. package/dist/plugin/worker/rsc/rsc-worker.development.d.ts.map +1 -1
  331. package/dist/plugin/worker/rsc/rsc-worker.development.js +29 -4
  332. package/dist/plugin/worker/rsc/rsc-worker.development.js.map +1 -1
  333. package/dist/plugin/worker/rsc/rsc-worker.production.js +3 -3
  334. package/dist/plugin/worker/rsc/rsc-worker.production.js.map +1 -1
  335. package/dist/plugin/worker/rsc/state.d.ts +73 -2
  336. package/dist/plugin/worker/rsc/state.d.ts.map +1 -1
  337. package/dist/plugin/worker/rsc/state.js +40 -3
  338. package/dist/plugin/worker/rsc/state.js.map +1 -1
  339. package/dist/plugin/worker/sendMessage.d.ts +3 -0
  340. package/dist/plugin/worker/sendMessage.d.ts.map +1 -0
  341. package/dist/plugin/worker/sendMessage.js +48 -0
  342. package/dist/plugin/worker/types.d.ts +218 -76
  343. package/dist/plugin/worker/types.d.ts.map +1 -1
  344. package/dist/server.d.ts +1 -1
  345. package/dist/server.d.ts.map +1 -1
  346. package/dist/server.js +6 -1
  347. package/dist/server.js.map +1 -1
  348. package/dist/tsconfig.tsbuildinfo +1 -1
  349. package/package.json +24 -14
  350. package/plugin/components.ts +1 -1
  351. package/plugin/config/autoDiscover/createGlobAutoDiscover.ts +29 -0
  352. package/plugin/config/autoDiscover/customWorkerFiles.ts +27 -0
  353. package/plugin/config/autoDiscover/pageAndPropFiles.ts +36 -0
  354. package/plugin/config/autoDiscover/resolveBuildPages.ts +98 -0
  355. package/plugin/config/defaults.tsx +38 -29
  356. package/plugin/config/getCondition.ts +7 -3
  357. package/plugin/config/getPaths.ts +1 -7
  358. package/plugin/config/index.ts +0 -1
  359. package/plugin/config/resolveAutoDiscover.ts +177 -0
  360. package/plugin/config/resolveOptions.ts +220 -118
  361. package/plugin/config/resolvePages.ts +5 -7
  362. package/plugin/config/resolveUrlOption.ts +43 -0
  363. package/plugin/config/resolveUserConfig.ts +116 -166
  364. package/plugin/copy.ts +39 -0
  365. package/plugin/css-collector-elements.tsx +21 -0
  366. package/plugin/css-collector.tsx +20 -53
  367. package/plugin/helpers/cleanObject.ts +50 -0
  368. package/plugin/helpers/collectBundleManifestCss.ts +160 -0
  369. package/plugin/helpers/collectManifestCss.ts +61 -0
  370. package/plugin/helpers/collectViteModuleGraphCss.ts +158 -0
  371. package/plugin/helpers/createCssProps.tsx +85 -0
  372. package/plugin/helpers/createEventHandler.ts +44 -0
  373. package/plugin/helpers/createHandler.ts +57 -126
  374. package/plugin/helpers/createRscStream.tsx +156 -0
  375. package/plugin/helpers/defaultFileWriter.ts +0 -0
  376. package/plugin/helpers/getBundleManifest.ts +42 -37
  377. package/plugin/helpers/getRouteFiles.ts +47 -0
  378. package/plugin/helpers/inputNormalizer.ts +16 -10
  379. package/plugin/helpers/metrics.ts +64 -0
  380. package/plugin/helpers/resolvePageAndProps.ts +81 -0
  381. package/plugin/helpers/serializeUserOptions.ts +209 -0
  382. package/plugin/helpers/stashReturnValue.ts +16 -0
  383. package/plugin/helpers/tryManifest.ts +35 -18
  384. package/plugin/html.tsx +14 -3
  385. package/plugin/index.ts +5 -2
  386. package/plugin/loader/createBuildLoader.ts +152 -47
  387. package/plugin/loader/css-loader.development.ts +157 -0
  388. package/plugin/loader/css-loader.production.ts +86 -0
  389. package/plugin/loader/index.ts +1 -0
  390. package/plugin/loader/plugin.ts +33 -0
  391. package/plugin/loader/react-loader.ts +109 -41
  392. package/plugin/loader/temporaryReferences.ts +3 -0
  393. package/plugin/moduleRefs.ts +11 -0
  394. package/plugin/plugin.client.ts +12 -0
  395. package/plugin/plugin.server.ts +25 -0
  396. package/plugin/plugin.ts +5 -9
  397. package/plugin/preserver/plugin.ts +1 -1
  398. package/plugin/react-client/index.ts +1 -12
  399. package/plugin/react-client/plugin.ts +70 -259
  400. package/plugin/react-client/server.ts +276 -0
  401. package/plugin/react-server/index.ts +1 -14
  402. package/plugin/react-server/plugin.ts +69 -220
  403. package/plugin/react-server/server.ts +128 -0
  404. package/plugin/react-static/collectHtmlWorkerContent.ts +120 -0
  405. package/plugin/react-static/collectRscContent.ts +77 -0
  406. package/plugin/react-static/configurePreviewServer.ts +68 -0
  407. package/plugin/react-static/fileWriter.ts +103 -0
  408. package/plugin/react-static/plugin.ts +308 -181
  409. package/plugin/react-static/renderPage.ts +151 -0
  410. package/plugin/react-static/renderPages.ts +154 -0
  411. package/plugin/react-static/renderStreams.ts +48 -0
  412. package/plugin/react-static/rscToHtmlStream.ts +85 -0
  413. package/plugin/react-static/streamHandler.ts +0 -0
  414. package/plugin/react-static/types.ts +10 -0
  415. package/plugin/resolvePage.ts +67 -57
  416. package/plugin/resolveProps.ts +148 -104
  417. package/plugin/root.ts +1 -1
  418. package/plugin/transformer/index.ts +2 -1
  419. package/plugin/transformer/plugin.client.ts +109 -0
  420. package/plugin/transformer/plugin.server.ts +98 -0
  421. package/plugin/transformer/plugin.ts +2 -115
  422. package/plugin/transformer/upgradeCssModuleCode.ts +42 -0
  423. package/plugin/types/css-tracking.ts +5 -0
  424. package/plugin/types/react-server-dom-esm.d.ts +54 -0
  425. package/plugin/types.ts +508 -97
  426. package/plugin/vendor.client.ts +12 -0
  427. package/plugin/vendor.server.ts +12 -0
  428. package/plugin/worker/createWorker.ts +158 -53
  429. package/plugin/worker/html/createHtmlWorkerRenderState.tsx +112 -0
  430. package/plugin/worker/html/html-worker.development.tsx +5 -75
  431. package/plugin/worker/html/html-worker.production.tsx +18 -7
  432. package/plugin/worker/html/messageHandler.tsx +126 -0
  433. package/plugin/worker/html/types.ts +19 -0
  434. package/plugin/worker/registerLoaders.ts +54 -0
  435. package/plugin/worker/rsc/handleRender.ts +180 -0
  436. package/plugin/worker/rsc/messageHandler.tsx +58 -132
  437. package/plugin/worker/rsc/rsc-worker.development.ts +49 -63
  438. package/plugin/worker/rsc/rsc-worker.production.ts +5 -5
  439. package/plugin/worker/rsc/state.ts +79 -2
  440. package/plugin/worker/sendMessage.ts +49 -0
  441. package/plugin/worker/types.ts +299 -100
  442. package/scripts/check-react-version.mjs +61 -38
  443. package/scripts/react+0.0.0-experimental-0ca8420f-20250504.patch +57 -0
  444. package/scripts/react-dom+0.0.0-experimental-0ca8420f-20250504.patch +819 -0
  445. package/scripts/{react-server-dom-esm+0.0.0-experimental-eda36a1c-20250228.patch → react-server-dom-esm+0.0.0-experimental-0ca8420f-20250504.patch} +1702 -2820
  446. package/tsconfig.json +7 -2
  447. package/dist/plugin/assertServerCondition.d.ts +0 -6
  448. package/dist/plugin/assertServerCondition.d.ts.map +0 -1
  449. package/dist/plugin/assertServerCondition.js +0 -13
  450. package/dist/plugin/checkFilesExist.d.ts +0 -3
  451. package/dist/plugin/checkFilesExist.d.ts.map +0 -1
  452. package/dist/plugin/checkFilesExist.js +0 -67
  453. package/dist/plugin/checkFilesExist.js.map +0 -1
  454. package/dist/plugin/collect-manifest-client-files.d.ts +0 -23
  455. package/dist/plugin/collect-manifest-client-files.d.ts.map +0 -1
  456. package/dist/plugin/collect-manifest-client-files.js +0 -131
  457. package/dist/plugin/collect-manifest-client-files.js.map +0 -1
  458. package/dist/plugin/config/getWorkerPath.d.ts +0 -2
  459. package/dist/plugin/config/getWorkerPath.d.ts.map +0 -1
  460. package/dist/plugin/config/getWorkerPath.js +0 -4
  461. package/dist/plugin/copy-dir.d.ts +0 -4
  462. package/dist/plugin/copy-dir.d.ts.map +0 -1
  463. package/dist/plugin/copy-dir.js +0 -25
  464. package/dist/plugin/copy-dir.js.map +0 -1
  465. package/dist/plugin/css-collector-inline.d.ts +0 -10
  466. package/dist/plugin/css-collector-inline.d.ts.map +0 -1
  467. package/dist/plugin/css-collector-inline.js +0 -55
  468. package/dist/plugin/css-collector-inline.js.map +0 -1
  469. package/dist/plugin/loader/css-loader.d.ts +0 -16
  470. package/dist/plugin/loader/css-loader.d.ts.map +0 -1
  471. package/dist/plugin/loader/css-loader.js +0 -70
  472. package/dist/plugin/loader/css-loader.js.map +0 -1
  473. package/dist/plugin/react-client/index.js.map +0 -1
  474. package/dist/plugin/react-server/index.js.map +0 -1
  475. package/dist/plugin/worker/html/renderPages.d.ts +0 -26
  476. package/dist/plugin/worker/html/renderPages.d.ts.map +0 -1
  477. package/dist/plugin/worker/html/renderPages.js +0 -241
  478. package/dist/plugin/worker/html/renderPages.js.map +0 -1
  479. package/plugin/assertServerCondition.ts +0 -12
  480. package/plugin/checkFilesExist.ts +0 -66
  481. package/plugin/collect-manifest-client-files.ts +0 -167
  482. package/plugin/config/getWorkerPath.ts +0 -5
  483. package/plugin/copy-dir.ts +0 -27
  484. package/plugin/css-collector-inline.tsx +0 -60
  485. package/plugin/helpers/createRscStream.ts +0 -109
  486. package/plugin/loader/css-loader.ts +0 -94
  487. package/plugin/worker/html/messageHandler.ts +0 -130
  488. package/plugin/worker/html/renderPages.ts +0 -293
package/README.md CHANGED
@@ -45,16 +45,29 @@ This ensures the patch is applied after every `npm install`. If errors arise rel
45
45
 
46
46
  ## Plugin Structure and Purpose
47
47
 
48
- ### Strict Client-Server Separation
48
+ ### Environment-Based Execution
49
49
 
50
- This plugin enforces a **strict architectural separation** between client and server execution. It achieves this by requiring **distinct entry files** for both environments, preventing unintended dependencies or cross-thread interactions. While this approach improves maintainability and clarity, it requires additional boilerplate.
50
+ This plugin uses environment detection to determine the execution context. It achieves this by checking the `NODE_OPTIONS` environment variable:
51
51
 
52
- The separation is accomplished through two complementary plugins:
52
+ ```typescript
53
+ import { getCondition } from "vite-plugin-react-server"
53
54
 
54
- - **vite-plugin-react-server/client** → Handles client-side rendering and ESM bundling
55
- - **vite-plugin-react-server** → Manages server-side streaming and RSC processing
55
+ if(getCondition() !== 'react-server'){
56
+ throw new Error('-10 poision damage')
57
+ }
58
+ ```
59
+ Alternatively, you can pass the argument for the `react-` prefix to just get client or server back.
60
+
61
+ ```typescript
62
+ import { getCondition } from "vite-plugin-react-server"
63
+
64
+ import(`plugin.${getCondition('')}.js`)
65
+ ```
66
+
67
+ The main entry point adapts based on the environment:
56
68
 
57
- This ensures that client-side and server-side concerns remain isolated from the beginning, reducing potential inconsistencies.
69
+ - **Client Mode** (default) Does not require the react-server condition, uses a worker thread for RSC requests
70
+ - **Server Mode** (`NODE_OPTIONS="--conditions react-server"`) → Does not need worker thread for RSC requests
58
71
 
59
72
  ### Custom composition
60
73
 
@@ -62,7 +75,7 @@ You can pick and choose only the plugins you like to get the desired behavior as
62
75
 
63
76
  ### Worker support
64
77
 
65
- The client plugin uses the `rsc-worker` to create server side streams. The server plugin uses the `html-worker` to create client side html. If you don't want to use the rsc-worker, simply don't serve the client plugin. If you don't want to use the `html-worker` simply don't configure the `build.pages` option.
78
+ The client plugin uses the `rsc-worker` to create server side streams. The server plugin uses the `html-worker` to create client side html. If you don't want to use the rsc-worker, simply don't serve the plugin without the `react-server` condition. If you don't want to use the `html-worker` simply don't configure the `build.pages` option.
66
79
 
67
80
  ### Custom Worker
68
81
 
@@ -70,11 +83,15 @@ Both workers can be customized using the `htmlWorkerPath` and `rscWorkerPath` re
70
83
 
71
84
  Keep in mind that, using your custom worker means interacting with the message system of this plugin during development/static generation process.
72
85
 
86
+ For more information on creating your custom workers, see [docs](/docs)
87
+
73
88
 
74
89
  ## Plugin Usage
75
90
 
76
- ### Configuration
77
91
  ```ts
92
+ import { defineConfig, type Plugin } from "vite";
93
+ import { vitePluginReactClient } from "vite-plugin-react-server";
94
+ import { config } from "./vite.react.config";
78
95
  import type { StreamPluginOptions } from "vite-plugin-react-server/server";
79
96
 
80
97
  const createRouter = (file: "props.ts" | "page.tsx") => (url: string) => {
@@ -102,44 +119,39 @@ export const config = {
102
119
  pages: ["/", "/bidoof", "/404" ],
103
120
  },
104
121
  } satisfies StreamPluginOptions;
105
- ```
106
-
107
- ### vite-plugin-react-server/client
108
-
109
- Used in `vite.config.ts` for standard Vite client-side behavior
110
-
111
- ```ts
112
- import { defineConfig, type Plugin } from "vite";
113
- import { vitePluginReactClient } from "vite-plugin-react-server/client";
114
- import { config } from "./vite.react.config";
115
122
 
116
123
  export default defineConfig({
117
124
  plugins: vitePluginReactClient(config),
118
125
  });
119
126
  ```
120
127
 
128
+ ### Built-in React Server Components
129
+
130
+ This plugin has two built-in React Component, each can be configured through the options to be your own component. Defining your custom React server components will affect the final production output, they won't be used during development.
131
+ - Html - used as the wrapper for production pages (use vite's `index.html` for the development wrapper and entry point for client files)
132
+ - CssCollector - used to emit `<link>` and `<style>` tags based on `css` config
133
+
121
134
  #### Build Steps
122
135
 
123
136
  ```sh
124
137
  vite build
125
138
  ```
126
- Outputs React client-side ESM files to `dist/client`.
139
+ Targets browsers, outputs to `dist/static`.
127
140
 
128
141
  ```sh
129
142
  vite build --ssr
130
143
  ```
131
- Outputs files for server-side execution to `dist/server`.
144
+ Targets non-`react-server` node environment, used for server-side-rendering, outputs to `dist/client`.
132
145
 
133
146
  ```sh
134
- vite preview
147
+ NODE_OPTIONS="--conditions=react-server" vite build
135
148
  ```
136
- Serves the static directory.
149
+ Targets `react-server`-only environment, outputs to `dist/server`. In this case, `ssr` is implied and defaults to true.
137
150
 
138
151
  ---
139
152
 
140
153
  ### vite-plugin-react-server
141
154
 
142
- Used in `vite.server.config.ts`, this plugin strictly separates client and server execution. The client components will be emitted as references.
143
155
 
144
156
  ```ts
145
157
  import { defineConfig, Plugin } from "vite";
@@ -147,25 +159,22 @@ import { vitePluginReactServer } from "vite-plugin-react-server";
147
159
  import { config } from "./vite.react.config";
148
160
 
149
161
  export default defineConfig({
150
- plugins: vitePluginReactServer(config) as Plugin[],
162
+ plugins: vitePluginReactServer(config),
151
163
  });
152
164
  ```
153
165
 
154
166
  #### Running in Development
155
167
 
156
168
  ```sh
157
- NODE_OPTIONS="--conditions=react-server" vite --config vite.server.config.ts
169
+ NODE_OPTIONS="--conditions=react-server" vite
158
170
  ```
171
+ Is the recommended way for a more direct server pipeline that doesn't require a `rsc-worker`.
159
172
 
160
- #### Build Steps
161
-
173
+ To develop the app using the `rsc-worker`, simply run
162
174
  ```sh
163
- NODE_OPTIONS="--conditions=react-server" vite build --config vite.server.config.ts
175
+ vite
164
176
  ```
165
- Generates server and static folder. The plugin ensures proper SSR handling without requiring `--ssr` manually.
166
- Note: ssr can still be disabled via config `{ssr:false}`, which will enable vite's browser virtualization
167
-
168
- ---
177
+ without the `react-server` condition.
169
178
 
170
179
  ## Static Site Generation
171
180
 
@@ -189,7 +198,7 @@ dist/static/about/index.html
189
198
  dist/static/about/index.rsc
190
199
  ```
191
200
 
192
- The entire `dist/client` directory is copied into `dist/static`, as well as any assets used server-side. Allowing easy deployment by moving the static folder to a hosting service.
201
+ This plugin is included by default when the `react-server` condition is set.
193
202
 
194
203
  ---
195
204
 
@@ -247,11 +256,12 @@ Changes the default name "props"
247
256
 
248
257
  ```json
249
258
  "scripts": {
250
- "build": "build:client && build:server",
251
- "dev": "NODE_OPTIONS='--conditions react-server' vite --config vite.server.config.ts",
252
- "dev:client": "vite",
253
- "build:server": "NODE_OPTIONS='--conditions react-server' vite build --config vite.server.config.ts",
254
- "build:client": "vite build"
259
+ "build": "build:static && build:client && build:server",
260
+ "dev": "NODE_OPTIONS='--conditions react-server' vite",
261
+ "start": "vite",
262
+ "build:server": "NODE_OPTIONS='--conditions react-server' vite build",
263
+ "build:client": "vite build --ssr",
264
+ "build:static": "vite build"
255
265
  }
256
266
  ```
257
267
 
@@ -273,43 +283,6 @@ export const props = {
273
283
  };
274
284
  ```
275
285
 
276
- ### Vite Configuration Files
277
-
278
- #### Client Configuration (`vite.config.ts`)
279
-
280
- ```ts
281
- import { vitePluginReactClient } from "vite-plugin-react-server/client";
282
- import { defineConfig } from "vite";
283
-
284
- export default defineConfig({
285
- plugins: vitePluginReactClient(),
286
- });
287
- ```
288
-
289
- #### Server Configuration (`vite.server.config.ts`)
290
-
291
- ```ts
292
- import { vitePluginReactServer } from "vite-plugin-react-server";
293
- import { defineConfig } from "vite";
294
-
295
- export default defineConfig({
296
- plugins: vitePluginReactServer(),
297
- });
298
- ```
299
-
300
- ---
301
-
302
- ```sh
303
- NODE_OPTIONS='--conditions react-server' npx vite --config vite.server.config.ts
304
- ```
305
-
306
- In development mode, the server plugin pipes the React stream directly to the response.
307
-
308
- ```sh
309
- NODE_OPTIONS='--conditions react-server' npx vite build --config vite.server.config.ts
310
- ```
311
- This builds the `dist/server` directory. It sets ssr to true by default, so you can't forget to. Additionally, when the build is done it generates the `dist/static` directory using the /static plugin.
312
-
313
286
  ## Contributions
314
287
 
315
288
  If you want to help develop or maintain the plugin feel free to open a PR or issue on GitHub.
package/bin/patch.mjs CHANGED
@@ -3,25 +3,40 @@ import fs from 'node:fs/promises'
3
3
  import path, { dirname } from 'node:path'
4
4
  import { fileURLToPath } from 'node:url';
5
5
  import React from 'react';
6
- const reactVersion = React.version;
7
- const PATCH_RECONCILER_VERSION = reactVersion.replace('19.1.0', '0.0.0')
8
- const STUB_VERSION = '0.0.1'
6
+ import packageJSON from '../package.json' with { type: "json" };
7
+
9
8
  const __dirname = dirname(fileURLToPath(import.meta.url));
10
- const TEMPLATE_VERSION = '0.0.0-experimental-eda36a1c-20250228'
9
+
10
+ // Hardcoded template version from our last successful patch
11
+ const TEMPLATE_VERSION = "0.0.0-experimental-0ca8420f-20250504";
12
+ const templateVersionSuffix = TEMPLATE_VERSION.split("-experimental-")[1];
13
+
14
+ // Get installed version
15
+ const installedVersion = React.version;
16
+ const installedVersionSuffix = installedVersion.split("-experimental-")[1]
17
+
18
+ // Get peer dependency versions
19
+ const peerReactVersion = packageJSON.peerDependencies.react.replace("^", "");
20
+ const peerReactESMVersion = packageJSON.peerDependencies["react-server-dom-esm"].replace("^", "");
21
+ console.log('Template version:', TEMPLATE_VERSION);
22
+ console.log('Installed version:', installedVersion);
23
+ console.log('Peer version:', peerReactVersion);
24
+ console.log('ESM version (for final patch):', peerReactESMVersion);
11
25
 
12
26
  async function patchReactExperimental() {
13
27
  try {
14
- // Read installed React version from user's project
15
-
16
- if(TEMPLATE_VERSION === PATCH_RECONCILER_VERSION) {
17
- console.log('React version is patched')
28
+ if (templateVersionSuffix === installedVersionSuffix) {
29
+ console.log("React version is already patched", TEMPLATE_VERSION, installedVersion);
30
+ return;
18
31
  }
19
32
 
20
33
  // Define patches to process
21
34
  const patches = [
22
35
  {
36
+ // The template patch file uses our experimental version
23
37
  template: `../scripts/react-server-dom-esm+${TEMPLATE_VERSION}.patch`,
24
- output: `react-server-dom-esm+${STUB_VERSION}.patch`
38
+ // But the final patch file uses the ESM version
39
+ output: `react-server-dom-esm+${peerReactESMVersion}.patch`
25
40
  },
26
41
  ]
27
42
 
@@ -36,8 +51,8 @@ async function patchReactExperimental() {
36
51
 
37
52
  // Replace version strings
38
53
  patchContent = patchContent.replace(
39
- new RegExp(PATCH_RECONCILER_VERSION, 'g'),
40
- reactVersion
54
+ new RegExp(templateVersionSuffix, 'g'),
55
+ installedVersionSuffix
41
56
  )
42
57
 
43
58
  // Write the patch file
@@ -47,7 +62,7 @@ async function patchReactExperimental() {
47
62
  }
48
63
 
49
64
  console.log(`
50
- ✅ Created patch files for React packages for version ${reactVersion}
65
+ ✅ Created patch files for React packages for version ${installedVersion}
51
66
  Location: patches/
52
67
 
53
68
  Next steps:
@@ -0,0 +1,24 @@
1
+ /**
2
+ * vite-plugin-react-server
3
+ * Copyright (c) Nico Brinkkemper
4
+ * MIT License
5
+ */
6
+ const __variableDynamicImportRuntimeHelper = (glob, path, segs) => {
7
+ const v = glob[path];
8
+ if (v) {
9
+ return typeof v === "function" ? v() : Promise.resolve(v);
10
+ }
11
+ return new Promise((_, reject) => {
12
+ (typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(
13
+ reject.bind(
14
+ null,
15
+ new Error(
16
+ "Unknown variable dynamic import: " + path + (path.split("/").length !== segs ? ". Note that variables only represent file names one level deep." : "")
17
+ )
18
+ )
19
+ );
20
+ });
21
+ };
22
+
23
+ export { __variableDynamicImportRuntimeHelper as default };
24
+ //# sourceMappingURL=dynamic-import-helper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamic-import-helper.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/client.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export { vitePluginReactClient } from './plugin/react-client/index.js';
1
+ export { vitePluginReactServer as vitePluginReactClient } from './plugin/plugin.client.js';
2
2
  export type * from './plugin/types.js';
3
3
  //# sourceMappingURL=client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAGvE,mBAAmB,mBAAmB,CAAC"}
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../client.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,qBAAqB,IAAI,qBAAqB,EAAE,MAAM,2BAA2B,CAAA;AAG1F,mBAAmB,mBAAmB,CAAA"}
package/dist/client.js CHANGED
@@ -3,5 +3,5 @@
3
3
  * Copyright (c) Nico Brinkkemper
4
4
  * MIT License
5
5
  */
6
- export { vitePluginReactClient } from './plugin/react-client/index.js';
6
+ export { vitePluginReactServer as vitePluginReactClient } from './plugin/plugin.client.js';
7
7
  //# sourceMappingURL=client.js.map
package/dist/index.d.ts CHANGED
@@ -1,5 +1,3 @@
1
- import type { StreamPluginOptions } from './plugin/types.js';
2
- export declare const viteReactServer: (options: StreamPluginOptions) => Promise<import("vite").Plugin<any>[] | (() => void)>;
3
- export declare const viteReactClient: (options: StreamPluginOptions) => Promise<import("vite").Plugin<any>[] | (() => void)>;
4
- export declare const viteReactStream: (options: StreamPluginOptions) => Promise<import("vite").Plugin<any>[] | (() => void)>;
1
+ export declare const vitePluginReactServer: any;
2
+ export type * from './plugin/types.js';
5
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAI7D,eAAO,MAAM,eAAe,YAAmB,mBAAmB,yDAOjE,CAAA;AAED,eAAO,MAAM,eAAe,YAAmB,mBAAmB,yDAOjE,CAAA;AAED,eAAO,MAAM,eAAe,YAAa,mBAAmB,yDAM3D,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,qBAAqB,KAKhC,CAAA;AAGF,mBAAmB,mBAAmB,CAAA"}
package/dist/index.js CHANGED
@@ -3,32 +3,15 @@
3
3
  * Copyright (c) Nico Brinkkemper
4
4
  * MIT License
5
5
  */
6
- const isServer = process.env["NODE_OPTIONS"]?.match(/--conditions[= ]react-server/);
7
- const viteReactServer = async (options) => {
8
- if (!isServer) {
9
- return () => {
10
- };
11
- } else {
12
- const module = await import('./server.js');
13
- return module.vitePluginReactServer(options);
14
- }
15
- };
16
- const viteReactClient = async (options) => {
17
- if (isServer) {
18
- return () => {
19
- };
20
- } else {
21
- const module = await import('./client.js');
22
- return module.vitePluginReactClient(options);
23
- }
24
- };
25
- const viteReactStream = (options) => {
26
- if (isServer) {
27
- return viteReactClient(options);
28
- } else {
29
- return viteReactServer(options);
6
+ import __variableDynamicImportRuntimeHelper from './_virtual/dynamic-import-helper.js';
7
+
8
+ const condition = process.env["NODE_OPTIONS"]?.match(/--conditions[= ]react-server/) ? "server" : "client";
9
+ const vitePluginReactServer = await __variableDynamicImportRuntimeHelper((/* #__PURE__ */ Object.assign({})), `./plugin/react-server/plugin.${condition}.js`, 4).then((m) => {
10
+ if (!("vitePluginReactServer" in m)) {
11
+ throw new Error(`Could not find vitePluginReactServer in ./plugin/react-server/plugin.${condition}.js`);
30
12
  }
31
- };
13
+ return m["vitePluginReactServer"];
14
+ });
32
15
 
33
- export { viteReactClient, viteReactServer, viteReactStream };
16
+ export { vitePluginReactServer };
34
17
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../index.ts"],"sourcesContent":["\"use strict\";\n\nimport type { StreamPluginOptions } from './plugin/types.js';\n\nconst isServer = process.env['NODE_OPTIONS']?.match(/--conditions[= ]react-server/)\n\nexport const viteReactServer = async (options: StreamPluginOptions)=>{\n if(!isServer){\n return ()=>{}\n } else {\n const module = await import('./server.js')\n return module.vitePluginReactServer(options)\n }\n}\n\nexport const viteReactClient = async (options: StreamPluginOptions)=>{\n if(isServer){\n return ()=>{}\n } else {\n const module = await import('./client.js')\n return module.vitePluginReactClient(options)\n }\n}\n\nexport const viteReactStream = (options: StreamPluginOptions)=>{\n if(isServer){\n return viteReactClient(options)\n } else {\n return viteReactServer(options)\n }\n}"],"names":[],"mappings":";;;;;AAIA,MAAM,WAAW,OAAQ,CAAA,GAAA,CAAI,cAAc,CAAA,EAAG,MAAM,8BAA8B,CAAA;AAErE,MAAA,eAAA,GAAkB,OAAO,OAA+B,KAAA;AACnE,EAAA,IAAG,CAAC,QAAS,EAAA;AACX,IAAA,OAAO,MAAI;AAAA,KAAC;AAAA,GACP,MAAA;AACL,IAAM,MAAA,MAAA,GAAS,MAAM,OAAO,aAAa,CAAA;AACzC,IAAO,OAAA,MAAA,CAAO,sBAAsB,OAAO,CAAA;AAAA;AAE/C;AAEa,MAAA,eAAA,GAAkB,OAAO,OAA+B,KAAA;AACnE,EAAA,IAAG,QAAS,EAAA;AACR,IAAA,OAAO,MAAI;AAAA,KAAC;AAAA,GACT,MAAA;AACL,IAAM,MAAA,MAAA,GAAS,MAAM,OAAO,aAAa,CAAA;AACzC,IAAO,OAAA,MAAA,CAAO,sBAAsB,OAAO,CAAA;AAAA;AAE/C;AAEa,MAAA,eAAA,GAAkB,CAAC,OAA+B,KAAA;AAC7D,EAAA,IAAG,QAAS,EAAA;AACV,IAAA,OAAO,gBAAgB,OAAO,CAAA;AAAA,GACzB,MAAA;AACL,IAAA,OAAO,gBAAgB,OAAO,CAAA;AAAA;AAElC;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../index.ts"],"sourcesContent":["\"use strict\";\n\nconst condition = process.env['NODE_OPTIONS']?.match(/--conditions[= ]react-server/) ? 'server' : 'client'\n\nexport const vitePluginReactServer = await import(`./plugin/react-server/plugin.${condition}.js`).then(m => {\n if(!('vitePluginReactServer' in m)){\n throw new Error(`Could not find vitePluginReactServer in ./plugin/react-server/plugin.${condition}.js`);\n }\n return m['vitePluginReactServer']\n})\n\n// types\nexport type * from './plugin/types.js'"],"names":[],"mappings":";;;;;;;AAEA,MAAM,SAAA,GAAY,QAAQ,GAAI,CAAA,cAAc,GAAG,KAAM,CAAA,8BAA8B,IAAI,QAAW,GAAA,QAAA;AAE3F,MAAM,wBAAwB,MAAM,4HAAgD,CAAO,KAAK,CAAK,CAAA,KAAA;AAC1G,EAAG,IAAA,EAAE,2BAA2B,CAAG,CAAA,EAAA;AACjC,IAAA,MAAM,IAAI,KAAA,CAAM,CAAwE,qEAAA,EAAA,SAAS,CAAK,GAAA,CAAA,CAAA;AAAA;AAExG,EAAA,OAAO,EAAE,uBAAuB,CAAA;AAClC,CAAC;;;;"}
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-react-server",
3
- "version": "1.0.3",
3
+ "version": "1.1.1",
4
4
  "description": "Vite plugin for React Server Components (RSC)",
5
5
  "type": "module",
6
6
  "main": "./dist/plugin/index.js",
@@ -22,12 +22,11 @@
22
22
  "./static": "./dist/static.js",
23
23
  "./html-worker": "./dist/plugin/worker/html-worker.js",
24
24
  "./rsc-worker": "./dist/plugin/worker/rsc-worker.js",
25
- "./loader": "./dist/plugin/worker/loader.js",
26
25
  "./package.json": "./package.json",
27
26
  "./patch": "./scripts/patch.mjs",
28
27
  "./check-react-version": "./scripts/check-react-version.mjs",
29
- "./css-loader": "./dist/plugin/loader/css-loader.js",
30
- "./components": "./dist/plugin/components.js"
28
+ "./components": "./dist/plugin/components.js",
29
+ "./types": "./dist/plugin/types.js"
31
30
  },
32
31
  "typesVersions": {
33
32
  "*": {
@@ -65,12 +64,22 @@
65
64
  "clean": "rm -rf dist",
66
65
  "prepublishOnly": "npm run build",
67
66
  "lint": "eslint ./src --fix",
68
- "test:server": "NODE_OPTIONS='--conditions react-server' vitest run",
69
- "test:client": "vitest run",
70
- "test": "npm run build && npm run test:client && NODE_ENV=development npm run test:server",
71
- "test:coverage": "vitest run --coverage",
72
- "test:ui": "vitest --ui",
73
- "experimental:clean-install": "npm install react-server-dom-esm react@experimental react-dom@experimental && npm install react-server-dom-esm",
67
+ "setup:test-fixtures": "npx tsx test/setup.ts",
68
+ "test:server": "npm run setup:test-fixtures && NODE_OPTIONS='--conditions react-server' vitest run",
69
+ "test:client": "npm run setup:test-fixtures && vitest run",
70
+ "test:build": "npm run setup:test-fixtures && npm test test/server/build.test.ts",
71
+ "test:llm": "rm -f build.log && npm run test:build 2>&1 | tee build.log",
72
+ "test:streams": "npm run build && npm run setup:test-fixtures && NODE_OPTIONS='--conditions react-server' vitest run test/server/renderStreams.test.ts -no-watch",
73
+ "test:renders": "npm run build && npm run setup:test-fixtures && NODE_OPTIONS='--conditions react-server' vitest run test/server/renderPages.test.ts -no-watch",
74
+ "test:html-worker": "npm run build && npm run setup:test-fixtures && NODE_OPTIONS='--conditions react-server' vitest run test/server/rscToHtmlStream.test.ts -no-watch",
75
+ "test:large-html": "npm run build && npm run setup:test-fixtures && NODE_OPTIONS='--conditions react-server' vitest run test/server/large-html.test.ts --reporter=verbose -no-watch",
76
+ "test:metrics": "npm run build && npm run setup:test-fixtures && NODE_OPTIONS='--conditions react-server' vitest run test/server/metrics.test.ts --reporter=verbose -no-watch",
77
+ "test:hooks": "npm run build && npm run setup:test-fixtures && NODE_OPTIONS='--conditions react-server' vitest run test/server/hooks.test.ts --reporter=verbose -no-watch",
78
+ "test:inline-css": "npm run build && npm run setup:test-fixtures && NODE_OPTIONS='--conditions react-server' vitest run test/server/inline-css.test.ts --reporter=verbose -no-watch",
79
+ "test": "npm run build && npm run setup:test-fixtures && npm run test:client && NODE_ENV=development npm run test:server",
80
+ "test:coverage": "npm run setup:test-fixtures && vitest run --coverage",
81
+ "test:ui": "npm run setup:test-fixtures && vitest --ui",
82
+ "experimental:clean-install": "npm install react-server-dom-esm react@experimental react-dom@experimental react-server-dom-esm --save-peer",
74
83
  "experimental:copy": "cp -r ./oss-experimental/* ./node_modules/",
75
84
  "experimental:patch": "npx patch-package react-server-dom-esm react react-dom --exclude 'nothing'",
76
85
  "experimental:move-patches": "mv patches/* ./scripts/",
@@ -99,8 +108,9 @@
99
108
  },
100
109
  "homepage": "https://github.com/nicobrinkkemper/vite-plugin-react-server#readme",
101
110
  "peerDependencies": {
102
- "react": "^0.0.0-experimental-6aa8254b-20250312",
103
- "react-dom": "^0.0.0-experimental-6aa8254b-20250312",
111
+ "react": "^0.0.0-experimental-0ff1d13b-20250507",
112
+ "react-dom": "^0.0.0-experimental-0ff1d13b-20250507",
113
+ "react-server-dom-esm": "^0.0.1",
104
114
  "vite": "*"
105
115
  },
106
116
  "peerDependenciesMeta": {
@@ -120,7 +130,6 @@
120
130
  "acorn-loose": "^8.3.0",
121
131
  "happy-dom": "^17.1.8",
122
132
  "patch-package": "^8.0.0",
123
- "react-server-dom-esm": "^0.0.1",
124
133
  "rollup": "^4.34.0",
125
134
  "source-map": "^0.7.4",
126
135
  "ts-node": "^10.9.2",
@@ -134,5 +143,6 @@
134
143
  "bin": {
135
144
  "check-react-version": "./scripts/check-react-version.mjs",
136
145
  "patch": "./bin/patch.mjs"
137
- }
146
+ },
147
+ "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
138
148
  }
@@ -1,4 +1,4 @@
1
1
  export { Html } from "./html.js";
2
2
  export { CssCollector } from "./css-collector.js";
3
- export { InlineCssCollector } from "./css-collector-inline.js";
3
+ export { CssCollectorElements } from "./css-collector-elements.js";
4
4
  //# sourceMappingURL=components.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../plugin/components.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC"}
1
+ {"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../plugin/components.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC"}
@@ -1,3 +1,3 @@
1
1
  export { Html } from "./html.js";
2
2
  export { CssCollector } from "./css-collector.js";
3
- export { InlineCssCollector } from "./css-collector-inline.js";
3
+ export { CssCollectorElements } from "./css-collector-elements.js";
@@ -0,0 +1,6 @@
1
+ import type { ResolvedUserOptions } from "../../types.js";
2
+ export declare function createGlobAutoDiscover(pattern: string): ({ inputs, userOptions, }: {
3
+ inputs: Record<string, string>;
4
+ userOptions: Pick<ResolvedUserOptions, "moduleBase" | "projectRoot" | "normalizer">;
5
+ }) => Promise<Record<string, string>>;
6
+ //# sourceMappingURL=createGlobAutoDiscover.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createGlobAutoDiscover.d.ts","sourceRoot":"","sources":["../../../../plugin/config/autoDiscover/createGlobAutoDiscover.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAI1D,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,8BAIjD;IACD,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,WAAW,EAAE,IAAI,CACf,mBAAmB,EACnB,YAAY,GAAG,aAAa,GAAG,YAAY,CAC5C,CAAC;CACH,qCAcF"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * vite-plugin-react-server
3
+ * Copyright (c) Nico Brinkkemper
4
+ * MIT License
5
+ */
6
+ import { glob } from 'node:fs/promises';
7
+ import { join } from 'node:path';
8
+
9
+ function createGlobAutoDiscover(pattern) {
10
+ return async function _globAutoDiscover({
11
+ inputs,
12
+ userOptions
13
+ }) {
14
+ const allFiles = glob(pattern, {
15
+ cwd: join(userOptions.projectRoot, userOptions.moduleBase)
16
+ });
17
+ for await (const file of allFiles) {
18
+ const [key, value] = userOptions.normalizer(
19
+ join(userOptions.moduleBase, file)
20
+ );
21
+ if (!inputs[key]) {
22
+ inputs[key] = value;
23
+ }
24
+ }
25
+ return inputs;
26
+ };
27
+ }
28
+
29
+ export { createGlobAutoDiscover };
30
+ //# sourceMappingURL=createGlobAutoDiscover.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createGlobAutoDiscover.js","sources":["../../../../plugin/config/autoDiscover/createGlobAutoDiscover.ts"],"sourcesContent":["import type { ResolvedUserOptions } from \"../../types.js\";\nimport { glob } from \"node:fs/promises\";\nimport { join } from \"node:path\";\n\nexport function createGlobAutoDiscover(pattern: string) {\n return async function _globAutoDiscover({\n inputs,\n userOptions,\n }: {\n inputs: Record<string, string>;\n userOptions: Pick<\n ResolvedUserOptions,\n \"moduleBase\" | \"projectRoot\" | \"normalizer\"\n >;\n }) {\n const allFiles = glob(pattern, {\n cwd: join(userOptions.projectRoot, userOptions.moduleBase),\n });\n for await (const file of allFiles) {\n const [key, value] = userOptions.normalizer(\n join(userOptions.moduleBase, file)\n );\n if (!inputs[key]) {\n inputs[key] = value;\n }\n }\n return inputs;\n };\n}\n"],"names":[],"mappings":";;;;;;;;AAIO,SAAS,uBAAuB,OAAiB,EAAA;AACtD,EAAA,OAAO,eAAe,iBAAkB,CAAA;AAAA,IACtC,MAAA;AAAA,IACA;AAAA,GAOC,EAAA;AACD,IAAM,MAAA,QAAA,GAAW,KAAK,OAAS,EAAA;AAAA,MAC7B,GAAK,EAAA,IAAA,CAAK,WAAY,CAAA,WAAA,EAAa,YAAY,UAAU;AAAA,KAC1D,CAAA;AACD,IAAA,WAAA,MAAiB,QAAQ,QAAU,EAAA;AACjC,MAAA,MAAM,CAAC,GAAA,EAAK,KAAK,CAAA,GAAI,WAAY,CAAA,UAAA;AAAA,QAC/B,IAAA,CAAK,WAAY,CAAA,UAAA,EAAY,IAAI;AAAA,OACnC;AACA,MAAI,IAAA,CAAC,MAAO,CAAA,GAAG,CAAG,EAAA;AAChB,QAAA,MAAA,CAAO,GAAG,CAAI,GAAA,KAAA;AAAA;AAChB;AAEF,IAAO,OAAA,MAAA;AAAA,GACT;AACF;;;;"}
@@ -0,0 +1,13 @@
1
+ import type { ResolvedUserOptions } from "../../types.js";
2
+ /**
3
+ * Logic to resolve custom worker files, when the path is not relative to the plugin root,
4
+ * we assume it's a custom worker file and we need to add it to the inputs.
5
+ *
6
+ * @param param0
7
+ * @returns
8
+ */
9
+ export declare const customWorkerFiles: ({ inputs, userOptions, }: {
10
+ inputs: Record<string, string>;
11
+ userOptions: Pick<ResolvedUserOptions, "rscWorkerPath" | "htmlWorkerPath">;
12
+ }) => Record<string, string>;
13
+ //# sourceMappingURL=customWorkerFiles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customWorkerFiles.d.ts","sourceRoot":"","sources":["../../../../plugin/config/autoDiscover/customWorkerFiles.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAE1D;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,6BAG3B;IACD,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,WAAW,EAAE,IAAI,CAAC,mBAAmB,EAAE,eAAe,GAAG,gBAAgB,CAAC,CAAC;CAC5E,2BAUA,CAAC"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * vite-plugin-react-server
3
+ * Copyright (c) Nico Brinkkemper
4
+ * MIT License
5
+ */
6
+ import { pluginRoot } from '../../root.js';
7
+
8
+ const customWorkerFiles = ({
9
+ inputs,
10
+ userOptions
11
+ }) => {
12
+ const customRscWorker = !userOptions.rscWorkerPath.startsWith(pluginRoot);
13
+ const customHtmlWorker = !userOptions.htmlWorkerPath.startsWith(pluginRoot);
14
+ if (customRscWorker && !inputs["rsc-worker"]) {
15
+ inputs["rsc-worker"] = userOptions.rscWorkerPath;
16
+ }
17
+ if (customHtmlWorker && !inputs["html-worker"]) {
18
+ inputs["html-worker"] = userOptions.htmlWorkerPath;
19
+ }
20
+ return inputs;
21
+ };
22
+
23
+ export { customWorkerFiles };
24
+ //# sourceMappingURL=customWorkerFiles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customWorkerFiles.js","sources":["../../../../plugin/config/autoDiscover/customWorkerFiles.ts"],"sourcesContent":["import { pluginRoot } from \"../../root.js\";\nimport type { ResolvedUserOptions } from \"../../types.js\";\n\n/**\n * Logic to resolve custom worker files, when the path is not relative to the plugin root,\n * we assume it's a custom worker file and we need to add it to the inputs.\n * \n * @param param0 \n * @returns \n */\nexport const customWorkerFiles = ({\n inputs,\n userOptions,\n}: {\n inputs: Record<string, string>;\n userOptions: Pick<ResolvedUserOptions, \"rscWorkerPath\" | \"htmlWorkerPath\">;\n}) => {\n const customRscWorker = !userOptions.rscWorkerPath.startsWith(pluginRoot);\n const customHtmlWorker = !userOptions.htmlWorkerPath.startsWith(pluginRoot);\n if (customRscWorker && !inputs[\"rsc-worker\"]) {\n inputs[\"rsc-worker\"] = userOptions.rscWorkerPath;\n }\n if (customHtmlWorker && !inputs[\"html-worker\"]) {\n inputs[\"html-worker\"] = userOptions.htmlWorkerPath;\n }\n return inputs;\n};\n"],"names":[],"mappings":";;;;;;;AAUO,MAAM,oBAAoB,CAAC;AAAA,EAChC,MAAA;AAAA,EACA;AACF,CAGM,KAAA;AACJ,EAAA,MAAM,eAAkB,GAAA,CAAC,WAAY,CAAA,aAAA,CAAc,WAAW,UAAU,CAAA;AACxE,EAAA,MAAM,gBAAmB,GAAA,CAAC,WAAY,CAAA,cAAA,CAAe,WAAW,UAAU,CAAA;AAC1E,EAAA,IAAI,eAAmB,IAAA,CAAC,MAAO,CAAA,YAAY,CAAG,EAAA;AAC5C,IAAO,MAAA,CAAA,YAAY,IAAI,WAAY,CAAA,aAAA;AAAA;AAErC,EAAA,IAAI,gBAAoB,IAAA,CAAC,MAAO,CAAA,aAAa,CAAG,EAAA;AAC9C,IAAO,MAAA,CAAA,aAAa,IAAI,WAAY,CAAA,cAAA;AAAA;AAEtC,EAAO,OAAA,MAAA;AACT;;;;"}
@@ -0,0 +1,11 @@
1
+ import type { ResolvedBuildPages } from "../../types.js";
2
+ /**
3
+ * Logic to add page and prop files to the inputs, without extra prefix
4
+ * @param param0
5
+ * @returns
6
+ */
7
+ export declare const pageAndPropFiles: ({ files, inputs, }: {
8
+ files: ResolvedBuildPages | undefined;
9
+ inputs: Record<string, string>;
10
+ }) => Record<string, string>;
11
+ //# sourceMappingURL=pageAndPropFiles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pageAndPropFiles.d.ts","sourceRoot":"","sources":["../../../../plugin/config/autoDiscover/pageAndPropFiles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEzD;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,uBAGxB;IACD,KAAK,EAAE,kBAAkB,GAAG,SAAS,CAAC;IACtC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAChC,2BAsBA,CAAC"}