vite-plugin-react-server 1.0.2 → 1.1.0
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.
- package/README.md +49 -76
- package/bin/patch.mjs +27 -20
- package/dist/_virtual/dynamic-import-helper.js +24 -0
- package/dist/_virtual/dynamic-import-helper.js.map +1 -0
- package/dist/client.d.ts +1 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +1 -1
- package/dist/index.d.ts +2 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -26
- package/dist/index.js.map +1 -1
- package/dist/package.json +24 -14
- package/dist/plugin/components.d.ts +1 -1
- package/dist/plugin/components.d.ts.map +1 -1
- package/dist/plugin/components.js +1 -1
- package/dist/plugin/config/autoDiscover/createGlobAutoDiscover.d.ts +6 -0
- package/dist/plugin/config/autoDiscover/createGlobAutoDiscover.d.ts.map +1 -0
- package/dist/plugin/config/autoDiscover/createGlobAutoDiscover.js +30 -0
- package/dist/plugin/config/autoDiscover/createGlobAutoDiscover.js.map +1 -0
- package/dist/plugin/config/autoDiscover/customWorkerFiles.d.ts +13 -0
- package/dist/plugin/config/autoDiscover/customWorkerFiles.d.ts.map +1 -0
- package/dist/plugin/config/autoDiscover/customWorkerFiles.js +24 -0
- package/dist/plugin/config/autoDiscover/customWorkerFiles.js.map +1 -0
- package/dist/plugin/config/autoDiscover/pageAndPropFiles.d.ts +11 -0
- package/dist/plugin/config/autoDiscover/pageAndPropFiles.d.ts.map +1 -0
- package/dist/plugin/config/autoDiscover/pageAndPropFiles.js +29 -0
- package/dist/plugin/config/autoDiscover/pageAndPropFiles.js.map +1 -0
- package/dist/plugin/config/autoDiscover/resolveBuildPages.d.ts +6 -0
- package/dist/plugin/config/autoDiscover/resolveBuildPages.d.ts.map +1 -0
- package/dist/plugin/config/autoDiscover/resolveBuildPages.js +83 -0
- package/dist/plugin/config/autoDiscover/resolveBuildPages.js.map +1 -0
- package/dist/plugin/config/defaults.d.ts +18 -14
- package/dist/plugin/config/defaults.d.ts.map +1 -1
- package/dist/plugin/config/defaults.js +42 -21
- package/dist/plugin/config/defaults.js.map +1 -1
- package/dist/plugin/config/getCondition.d.ts +1 -1
- package/dist/plugin/config/getCondition.d.ts.map +1 -1
- package/dist/plugin/config/getCondition.js +2 -2
- package/dist/plugin/config/getCondition.js.map +1 -1
- package/dist/plugin/config/getPaths.d.ts +0 -1
- package/dist/plugin/config/getPaths.d.ts.map +1 -1
- package/dist/plugin/config/getPaths.js.map +1 -1
- package/dist/plugin/config/index.d.ts +0 -1
- package/dist/plugin/config/index.d.ts.map +1 -1
- package/dist/plugin/config/index.js +0 -1
- package/dist/plugin/config/resolveAutoDiscover.d.ts +20 -0
- package/dist/plugin/config/resolveAutoDiscover.d.ts.map +1 -0
- package/dist/plugin/config/resolveAutoDiscover.js +128 -0
- package/dist/plugin/config/resolveAutoDiscover.js.map +1 -0
- package/dist/plugin/config/resolveOptions.d.ts +1 -1
- package/dist/plugin/config/resolveOptions.d.ts.map +1 -1
- package/dist/plugin/config/resolveOptions.js +109 -77
- package/dist/plugin/config/resolveOptions.js.map +1 -1
- package/dist/plugin/config/resolvePages.d.ts +0 -1
- package/dist/plugin/config/resolvePages.d.ts.map +1 -1
- package/dist/plugin/config/resolvePages.js +6 -8
- package/dist/plugin/config/resolvePages.js.map +1 -1
- package/dist/plugin/config/resolveUrlOption.d.ts +16 -0
- package/dist/plugin/config/resolveUrlOption.d.ts.map +1 -0
- package/dist/plugin/config/resolveUrlOption.js +37 -0
- package/dist/plugin/config/resolveUrlOption.js.map +1 -0
- package/dist/plugin/config/resolveUserConfig.d.ts +4 -5
- package/dist/plugin/config/resolveUserConfig.d.ts.map +1 -1
- package/dist/plugin/config/resolveUserConfig.js +80 -132
- package/dist/plugin/config/resolveUserConfig.js.map +1 -1
- package/dist/plugin/copy.d.ts +7 -0
- package/dist/plugin/copy.d.ts.map +1 -0
- package/dist/plugin/copy.js +30 -0
- package/dist/plugin/css-collector-elements.d.ts +4 -0
- package/dist/plugin/css-collector-elements.d.ts.map +1 -0
- package/dist/plugin/css-collector-elements.js +19 -0
- package/dist/plugin/css-collector-elements.js.map +1 -0
- package/dist/plugin/css-collector.d.ts +2 -8
- package/dist/plugin/css-collector.d.ts.map +1 -1
- package/dist/plugin/css-collector.js +9 -36
- package/dist/plugin/css-collector.js.map +1 -1
- package/dist/plugin/helpers/cleanObject.d.ts +3 -0
- package/dist/plugin/helpers/cleanObject.d.ts.map +1 -0
- package/dist/plugin/helpers/cleanObject.js +47 -0
- package/dist/plugin/helpers/cleanObject.js.map +1 -0
- package/dist/plugin/helpers/collectBundleManifestCss.d.ts +8 -0
- package/dist/plugin/helpers/collectBundleManifestCss.d.ts.map +1 -0
- package/dist/plugin/helpers/collectBundleManifestCss.js +110 -0
- package/dist/plugin/helpers/collectManifestCss.d.ts +7 -0
- package/dist/plugin/helpers/collectManifestCss.d.ts.map +1 -0
- package/dist/plugin/helpers/collectManifestCss.js +44 -0
- package/dist/plugin/helpers/collectManifestCss.js.map +1 -0
- package/dist/plugin/helpers/collectViteModuleGraphCss.d.ts +31 -0
- package/dist/plugin/helpers/collectViteModuleGraphCss.d.ts.map +1 -0
- package/dist/plugin/helpers/collectViteModuleGraphCss.js +104 -0
- package/dist/plugin/helpers/collectViteModuleGraphCss.js.map +1 -0
- package/dist/plugin/helpers/createCssProps.d.ts +25 -0
- package/dist/plugin/helpers/createCssProps.d.ts.map +1 -0
- package/dist/plugin/helpers/createCssProps.js +57 -0
- package/dist/plugin/helpers/createCssProps.js.map +1 -0
- package/dist/plugin/helpers/createEventHandler.d.ts +22 -0
- package/dist/plugin/helpers/createEventHandler.d.ts.map +1 -0
- package/dist/plugin/helpers/createEventHandler.js +36 -0
- package/dist/plugin/helpers/createEventHandler.js.map +1 -0
- package/dist/plugin/helpers/createHandler.d.ts +7 -13
- package/dist/plugin/helpers/createHandler.d.ts.map +1 -1
- package/dist/plugin/helpers/createHandler.js +54 -96
- package/dist/plugin/helpers/createHandler.js.map +1 -1
- package/dist/plugin/helpers/createRscStream.d.ts +12 -26
- package/dist/plugin/helpers/createRscStream.d.ts.map +1 -1
- package/dist/plugin/helpers/createRscStream.js +105 -51
- package/dist/plugin/helpers/createRscStream.js.map +1 -1
- package/dist/plugin/helpers/defaultFileWriter.d.ts +2 -0
- package/dist/plugin/helpers/defaultFileWriter.d.ts.map +1 -0
- package/dist/plugin/helpers/defaultFileWriter.js +1 -0
- package/dist/plugin/helpers/getBundleManifest.d.ts +10 -16
- package/dist/plugin/helpers/getBundleManifest.d.ts.map +1 -1
- package/dist/plugin/helpers/getBundleManifest.js +30 -22
- package/dist/plugin/helpers/getBundleManifest.js.map +1 -1
- package/dist/plugin/helpers/getRouteFiles.d.ts +14 -0
- package/dist/plugin/helpers/getRouteFiles.d.ts.map +1 -0
- package/dist/plugin/helpers/getRouteFiles.js +36 -0
- package/dist/plugin/helpers/getRouteFiles.js.map +1 -0
- package/dist/plugin/helpers/inputNormalizer.d.ts.map +1 -1
- package/dist/plugin/helpers/inputNormalizer.js +38 -32
- package/dist/plugin/helpers/inputNormalizer.js.map +1 -1
- package/dist/plugin/helpers/metrics.d.ts +11 -0
- package/dist/plugin/helpers/metrics.d.ts.map +1 -0
- package/dist/plugin/helpers/metrics.js +35 -0
- package/dist/plugin/helpers/metrics.js.map +1 -0
- package/dist/plugin/helpers/resolvePageAndProps.d.ts +27 -0
- package/dist/plugin/helpers/resolvePageAndProps.d.ts.map +1 -0
- package/dist/plugin/helpers/resolvePageAndProps.js +51 -0
- package/dist/plugin/helpers/resolvePageAndProps.js.map +1 -0
- package/dist/plugin/helpers/serializeUserOptions.d.ts +8 -0
- package/dist/plugin/helpers/serializeUserOptions.d.ts.map +1 -0
- package/dist/plugin/helpers/serializeUserOptions.js +182 -0
- package/dist/plugin/helpers/serializeUserOptions.js.map +1 -0
- package/dist/plugin/helpers/stashReturnValue.d.ts +2 -0
- package/dist/plugin/helpers/stashReturnValue.d.ts.map +1 -0
- package/dist/plugin/helpers/stashReturnValue.js +14 -0
- package/dist/plugin/helpers/tryManifest.d.ts +5 -3
- package/dist/plugin/helpers/tryManifest.d.ts.map +1 -1
- package/dist/plugin/helpers/tryManifest.js +16 -7
- package/dist/plugin/helpers/tryManifest.js.map +1 -1
- package/dist/plugin/html.d.ts +2 -3
- package/dist/plugin/html.d.ts.map +1 -1
- package/dist/plugin/html.js +7 -1
- package/dist/plugin/html.js.map +1 -1
- package/dist/plugin/index.d.ts +1 -2
- package/dist/plugin/index.d.ts.map +1 -1
- package/dist/plugin/index.js +3 -1
- package/dist/plugin/loader/createBuildLoader.d.ts +26 -4
- package/dist/plugin/loader/createBuildLoader.d.ts.map +1 -1
- package/dist/plugin/loader/createBuildLoader.js +98 -33
- package/dist/plugin/loader/createBuildLoader.js.map +1 -1
- package/dist/plugin/loader/css-loader.development.d.ts +57 -0
- package/dist/plugin/loader/css-loader.development.d.ts.map +1 -0
- package/dist/plugin/loader/css-loader.development.js +81 -0
- package/dist/plugin/loader/css-loader.development.js.map +1 -0
- package/dist/plugin/loader/css-loader.production.d.ts +31 -0
- package/dist/plugin/loader/css-loader.production.d.ts.map +1 -0
- package/dist/plugin/loader/css-loader.production.js +45 -0
- package/dist/plugin/loader/css-loader.production.js.map +1 -0
- package/dist/plugin/loader/index.d.ts +2 -0
- package/dist/plugin/loader/index.d.ts.map +1 -0
- package/dist/plugin/loader/index.js +1 -0
- package/dist/plugin/loader/plugin.d.ts +22 -0
- package/dist/plugin/loader/plugin.d.ts.map +1 -0
- package/dist/plugin/loader/plugin.js +27 -0
- package/dist/plugin/loader/react-loader.d.ts +3 -7
- package/dist/plugin/loader/react-loader.d.ts.map +1 -1
- package/dist/plugin/loader/react-loader.js +85 -30
- package/dist/plugin/loader/react-loader.js.map +1 -1
- package/dist/plugin/loader/temporaryReferences.d.ts +2 -0
- package/dist/plugin/loader/temporaryReferences.d.ts.map +1 -0
- package/dist/plugin/loader/temporaryReferences.js +11 -0
- package/dist/plugin/loader/temporaryReferences.js.map +1 -0
- package/dist/plugin/moduleRefs.d.ts +7 -0
- package/dist/plugin/moduleRefs.d.ts.map +1 -0
- package/dist/plugin/moduleRefs.js +17 -0
- package/dist/plugin/moduleRefs.js.map +1 -0
- package/dist/plugin/plugin.client.d.ts +3 -0
- package/dist/plugin/plugin.client.d.ts.map +1 -0
- package/dist/plugin/plugin.client.js +19 -0
- package/dist/plugin/plugin.client.js.map +1 -0
- package/dist/plugin/plugin.d.ts +1 -5
- package/dist/plugin/plugin.d.ts.map +1 -1
- package/dist/plugin/plugin.js +3 -9
- package/dist/plugin/plugin.server.d.ts +3 -0
- package/dist/plugin/plugin.server.d.ts.map +1 -0
- package/dist/plugin/plugin.server.js +28 -0
- package/dist/plugin/plugin.server.js.map +1 -0
- package/dist/plugin/preserver/plugin.js +1 -1
- package/dist/plugin/preserver/plugin.js.map +1 -1
- package/dist/plugin/react-client/index.d.ts +1 -2
- package/dist/plugin/react-client/index.d.ts.map +1 -1
- package/dist/plugin/react-client/index.js +1 -19
- package/dist/plugin/react-client/plugin.d.ts.map +1 -1
- package/dist/plugin/react-client/plugin.js +60 -219
- package/dist/plugin/react-client/plugin.js.map +1 -1
- package/dist/plugin/react-client/server.d.ts +27 -0
- package/dist/plugin/react-client/server.d.ts.map +1 -0
- package/dist/plugin/react-client/server.js +197 -0
- package/dist/plugin/react-client/server.js.map +1 -0
- package/dist/plugin/react-server/index.d.ts +1 -2
- package/dist/plugin/react-server/index.d.ts.map +1 -1
- package/dist/plugin/react-server/index.js +1 -21
- package/dist/plugin/react-server/plugin.d.ts +0 -1
- package/dist/plugin/react-server/plugin.d.ts.map +1 -1
- package/dist/plugin/react-server/plugin.js +60 -186
- package/dist/plugin/react-server/plugin.js.map +1 -1
- package/dist/plugin/react-server/server.d.ts +9 -0
- package/dist/plugin/react-server/server.d.ts.map +1 -0
- package/dist/plugin/react-server/server.js +120 -0
- package/dist/plugin/react-server/server.js.map +1 -0
- package/dist/plugin/react-static/collectHtmlWorkerContent.d.ts +23 -0
- package/dist/plugin/react-static/collectHtmlWorkerContent.d.ts.map +1 -0
- package/dist/plugin/react-static/collectHtmlWorkerContent.js +85 -0
- package/dist/plugin/react-static/collectHtmlWorkerContent.js.map +1 -0
- package/dist/plugin/react-static/collectRscContent.d.ts +24 -0
- package/dist/plugin/react-static/collectRscContent.d.ts.map +1 -0
- package/dist/plugin/react-static/collectRscContent.js +49 -0
- package/dist/plugin/react-static/collectRscContent.js.map +1 -0
- package/dist/plugin/react-static/configurePreviewServer.d.ts +7 -0
- package/dist/plugin/react-static/configurePreviewServer.d.ts.map +1 -0
- package/dist/plugin/react-static/configurePreviewServer.js +67 -0
- package/dist/plugin/react-static/configurePreviewServer.js.map +1 -0
- package/dist/plugin/react-static/fileWriter.d.ts +23 -0
- package/dist/plugin/react-static/fileWriter.d.ts.map +1 -0
- package/dist/plugin/react-static/fileWriter.js +65 -0
- package/dist/plugin/react-static/fileWriter.js.map +1 -0
- package/dist/plugin/react-static/plugin.d.ts +15 -0
- package/dist/plugin/react-static/plugin.d.ts.map +1 -1
- package/dist/plugin/react-static/plugin.js +248 -149
- package/dist/plugin/react-static/plugin.js.map +1 -1
- package/dist/plugin/react-static/renderPage.d.ts +3 -0
- package/dist/plugin/react-static/renderPage.d.ts.map +1 -0
- package/dist/plugin/react-static/renderPage.js +116 -0
- package/dist/plugin/react-static/renderPage.js.map +1 -0
- package/dist/plugin/react-static/renderPages.d.ts +3 -0
- package/dist/plugin/react-static/renderPages.d.ts.map +1 -0
- package/dist/plugin/react-static/renderPages.js +125 -0
- package/dist/plugin/react-static/renderPages.js.map +1 -0
- package/dist/plugin/react-static/renderStreams.d.ts +26 -0
- package/dist/plugin/react-static/renderStreams.d.ts.map +1 -0
- package/dist/plugin/react-static/renderStreams.js +27 -0
- package/dist/plugin/react-static/renderStreams.js.map +1 -0
- package/dist/plugin/react-static/rscToHtmlStream.d.ts +22 -0
- package/dist/plugin/react-static/rscToHtmlStream.d.ts.map +1 -0
- package/dist/plugin/react-static/rscToHtmlStream.js +54 -0
- package/dist/plugin/react-static/rscToHtmlStream.js.map +1 -0
- package/dist/plugin/react-static/streamHandler.d.ts +2 -0
- package/dist/plugin/react-static/streamHandler.d.ts.map +1 -0
- package/dist/plugin/react-static/streamHandler.js +1 -0
- package/dist/plugin/react-static/types.d.ts +11 -0
- package/dist/plugin/react-static/types.d.ts.map +1 -1
- package/dist/plugin/resolvePage.d.ts +26 -9
- package/dist/plugin/resolvePage.d.ts.map +1 -1
- package/dist/plugin/resolvePage.js +41 -39
- package/dist/plugin/resolvePage.js.map +1 -1
- package/dist/plugin/resolveProps.d.ts +40 -7
- package/dist/plugin/resolveProps.d.ts.map +1 -1
- package/dist/plugin/resolveProps.js +100 -75
- package/dist/plugin/resolveProps.js.map +1 -1
- package/dist/plugin/root.d.ts +1 -0
- package/dist/plugin/root.d.ts.map +1 -1
- package/dist/plugin/root.js +1 -0
- package/dist/plugin/root.js.map +1 -1
- package/dist/plugin/transformer/index.d.ts +2 -1
- package/dist/plugin/transformer/index.d.ts.map +1 -1
- package/dist/plugin/transformer/index.js +2 -1
- package/dist/plugin/transformer/plugin.client.d.ts +4 -0
- package/dist/plugin/transformer/plugin.client.d.ts.map +1 -0
- package/dist/plugin/transformer/plugin.client.js +83 -0
- package/dist/plugin/transformer/plugin.client.js.map +1 -0
- package/dist/plugin/transformer/plugin.d.ts +1 -27
- package/dist/plugin/transformer/plugin.d.ts.map +1 -1
- package/dist/plugin/transformer/plugin.js +3 -87
- package/dist/plugin/transformer/plugin.js.map +1 -1
- package/dist/plugin/transformer/plugin.server.d.ts +4 -0
- package/dist/plugin/transformer/plugin.server.d.ts.map +1 -0
- package/dist/plugin/transformer/plugin.server.js +76 -0
- package/dist/plugin/transformer/plugin.server.js.map +1 -0
- package/dist/plugin/transformer/upgradeCssModuleCode.d.ts +11 -0
- package/dist/plugin/transformer/upgradeCssModuleCode.d.ts.map +1 -0
- package/dist/plugin/transformer/upgradeCssModuleCode.js +38 -0
- package/dist/plugin/types/css-tracking.d.ts +6 -0
- package/dist/plugin/types/css-tracking.d.ts.map +1 -0
- package/dist/plugin/types/css-tracking.js +1 -0
- package/dist/plugin/types.d.ts +372 -86
- package/dist/plugin/types.d.ts.map +1 -1
- package/dist/plugin/types.js +1 -1
- package/dist/plugin/vendor.client.d.ts +4 -0
- package/dist/plugin/vendor.client.d.ts.map +1 -0
- package/dist/plugin/vendor.client.js +16 -0
- package/dist/plugin/vendor.client.js.map +1 -0
- package/dist/plugin/vendor.server.d.ts +4 -0
- package/dist/plugin/vendor.server.d.ts.map +1 -0
- package/dist/plugin/vendor.server.js +16 -0
- package/dist/plugin/vendor.server.js.map +1 -0
- package/dist/plugin/worker/createWorker.d.ts +25 -7
- package/dist/plugin/worker/createWorker.d.ts.map +1 -1
- package/dist/plugin/worker/createWorker.js +108 -33
- package/dist/plugin/worker/createWorker.js.map +1 -1
- package/dist/plugin/worker/html/createHtmlWorkerRenderState.d.ts +12 -0
- package/dist/plugin/worker/html/createHtmlWorkerRenderState.d.ts.map +1 -0
- package/dist/plugin/worker/html/createHtmlWorkerRenderState.js +103 -0
- package/dist/plugin/worker/html/createHtmlWorkerRenderState.js.map +1 -0
- package/dist/plugin/worker/html/html-worker.development.d.ts +0 -30
- package/dist/plugin/worker/html/html-worker.development.d.ts.map +1 -1
- package/dist/plugin/worker/html/html-worker.development.js +3 -17
- package/dist/plugin/worker/html/html-worker.development.js.map +1 -1
- package/dist/plugin/worker/html/html-worker.production.js +12 -5
- package/dist/plugin/worker/html/html-worker.production.js.map +1 -1
- package/dist/plugin/worker/html/messageHandler.d.ts +2 -2
- package/dist/plugin/worker/html/messageHandler.d.ts.map +1 -1
- package/dist/plugin/worker/html/messageHandler.js +87 -84
- package/dist/plugin/worker/html/messageHandler.js.map +1 -1
- package/dist/plugin/worker/html/types.d.ts +18 -0
- package/dist/plugin/worker/html/types.d.ts.map +1 -0
- package/dist/plugin/worker/html/types.js +1 -0
- package/dist/plugin/worker/registerLoaders.d.ts +9 -0
- package/dist/plugin/worker/registerLoaders.d.ts.map +1 -0
- package/dist/plugin/worker/registerLoaders.js +45 -0
- package/dist/plugin/worker/rsc/handleRender.d.ts +4 -0
- package/dist/plugin/worker/rsc/handleRender.d.ts.map +1 -0
- package/dist/plugin/worker/rsc/handleRender.js +147 -0
- package/dist/plugin/worker/rsc/handleRender.js.map +1 -0
- package/dist/plugin/worker/rsc/messageHandler.d.ts +2 -2
- package/dist/plugin/worker/rsc/messageHandler.d.ts.map +1 -1
- package/dist/plugin/worker/rsc/messageHandler.js +47 -112
- package/dist/plugin/worker/rsc/messageHandler.js.map +1 -1
- package/dist/plugin/worker/rsc/rsc-worker.development.d.ts +0 -30
- package/dist/plugin/worker/rsc/rsc-worker.development.d.ts.map +1 -1
- package/dist/plugin/worker/rsc/rsc-worker.development.js +29 -4
- package/dist/plugin/worker/rsc/rsc-worker.development.js.map +1 -1
- package/dist/plugin/worker/rsc/rsc-worker.production.js +3 -3
- package/dist/plugin/worker/rsc/rsc-worker.production.js.map +1 -1
- package/dist/plugin/worker/rsc/state.d.ts +73 -2
- package/dist/plugin/worker/rsc/state.d.ts.map +1 -1
- package/dist/plugin/worker/rsc/state.js +40 -3
- package/dist/plugin/worker/rsc/state.js.map +1 -1
- package/dist/plugin/worker/sendMessage.d.ts +3 -0
- package/dist/plugin/worker/sendMessage.d.ts.map +1 -0
- package/dist/plugin/worker/sendMessage.js +48 -0
- package/dist/plugin/worker/types.d.ts +218 -76
- package/dist/plugin/worker/types.d.ts.map +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +6 -1
- package/dist/server.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +24 -14
- package/plugin/components.ts +1 -1
- package/plugin/config/autoDiscover/createGlobAutoDiscover.ts +29 -0
- package/plugin/config/autoDiscover/customWorkerFiles.ts +27 -0
- package/plugin/config/autoDiscover/pageAndPropFiles.ts +36 -0
- package/plugin/config/autoDiscover/resolveBuildPages.ts +98 -0
- package/plugin/config/defaults.tsx +38 -29
- package/plugin/config/getCondition.ts +7 -3
- package/plugin/config/getPaths.ts +1 -7
- package/plugin/config/index.ts +0 -1
- package/plugin/config/resolveAutoDiscover.ts +177 -0
- package/plugin/config/resolveOptions.ts +220 -118
- package/plugin/config/resolvePages.ts +5 -7
- package/plugin/config/resolveUrlOption.ts +43 -0
- package/plugin/config/resolveUserConfig.ts +116 -166
- package/plugin/copy.ts +39 -0
- package/plugin/css-collector-elements.tsx +21 -0
- package/plugin/css-collector.tsx +20 -53
- package/plugin/helpers/cleanObject.ts +50 -0
- package/plugin/helpers/collectBundleManifestCss.ts +160 -0
- package/plugin/helpers/collectManifestCss.ts +61 -0
- package/plugin/helpers/collectViteModuleGraphCss.ts +158 -0
- package/plugin/helpers/createCssProps.tsx +85 -0
- package/plugin/helpers/createEventHandler.ts +44 -0
- package/plugin/helpers/createHandler.ts +57 -126
- package/plugin/helpers/createRscStream.tsx +156 -0
- package/plugin/helpers/defaultFileWriter.ts +0 -0
- package/plugin/helpers/getBundleManifest.ts +42 -37
- package/plugin/helpers/getRouteFiles.ts +47 -0
- package/plugin/helpers/inputNormalizer.ts +16 -10
- package/plugin/helpers/metrics.ts +64 -0
- package/plugin/helpers/resolvePageAndProps.ts +81 -0
- package/plugin/helpers/serializeUserOptions.ts +209 -0
- package/plugin/helpers/stashReturnValue.ts +16 -0
- package/plugin/helpers/tryManifest.ts +35 -18
- package/plugin/html.tsx +14 -3
- package/plugin/index.ts +5 -2
- package/plugin/loader/createBuildLoader.ts +152 -47
- package/plugin/loader/css-loader.development.ts +157 -0
- package/plugin/loader/css-loader.production.ts +86 -0
- package/plugin/loader/index.ts +1 -0
- package/plugin/loader/plugin.ts +33 -0
- package/plugin/loader/react-loader.ts +109 -41
- package/plugin/loader/temporaryReferences.ts +3 -0
- package/plugin/moduleRefs.ts +11 -0
- package/plugin/plugin.client.ts +12 -0
- package/plugin/plugin.server.ts +25 -0
- package/plugin/plugin.ts +5 -9
- package/plugin/preserver/plugin.ts +1 -1
- package/plugin/react-client/index.ts +1 -12
- package/plugin/react-client/plugin.ts +70 -259
- package/plugin/react-client/server.ts +276 -0
- package/plugin/react-server/index.ts +1 -14
- package/plugin/react-server/plugin.ts +69 -220
- package/plugin/react-server/server.ts +128 -0
- package/plugin/react-static/collectHtmlWorkerContent.ts +120 -0
- package/plugin/react-static/collectRscContent.ts +77 -0
- package/plugin/react-static/configurePreviewServer.ts +68 -0
- package/plugin/react-static/fileWriter.ts +103 -0
- package/plugin/react-static/plugin.ts +308 -181
- package/plugin/react-static/renderPage.ts +151 -0
- package/plugin/react-static/renderPages.ts +154 -0
- package/plugin/react-static/renderStreams.ts +48 -0
- package/plugin/react-static/rscToHtmlStream.ts +85 -0
- package/plugin/react-static/streamHandler.ts +0 -0
- package/plugin/react-static/types.ts +10 -0
- package/plugin/resolvePage.ts +67 -57
- package/plugin/resolveProps.ts +148 -104
- package/plugin/root.ts +1 -1
- package/plugin/transformer/index.ts +2 -1
- package/plugin/transformer/plugin.client.ts +109 -0
- package/plugin/transformer/plugin.server.ts +98 -0
- package/plugin/transformer/plugin.ts +2 -115
- package/plugin/transformer/upgradeCssModuleCode.ts +42 -0
- package/plugin/types/css-tracking.ts +5 -0
- package/plugin/types/react-server-dom-esm.d.ts +54 -0
- package/plugin/types.ts +508 -97
- package/plugin/vendor.client.ts +12 -0
- package/plugin/vendor.server.ts +12 -0
- package/plugin/worker/createWorker.ts +158 -53
- package/plugin/worker/html/createHtmlWorkerRenderState.tsx +112 -0
- package/plugin/worker/html/html-worker.development.tsx +5 -75
- package/plugin/worker/html/html-worker.production.tsx +18 -7
- package/plugin/worker/html/messageHandler.tsx +126 -0
- package/plugin/worker/html/types.ts +19 -0
- package/plugin/worker/registerLoaders.ts +54 -0
- package/plugin/worker/rsc/handleRender.ts +180 -0
- package/plugin/worker/rsc/messageHandler.tsx +58 -132
- package/plugin/worker/rsc/rsc-worker.development.ts +49 -63
- package/plugin/worker/rsc/rsc-worker.production.ts +5 -5
- package/plugin/worker/rsc/state.ts +79 -2
- package/plugin/worker/sendMessage.ts +49 -0
- package/plugin/worker/types.ts +299 -100
- package/scripts/check-react-version.mjs +60 -48
- package/scripts/react+0.0.0-experimental-0ca8420f-20250504.patch +57 -0
- package/scripts/react-dom+0.0.0-experimental-0ca8420f-20250504.patch +819 -0
- 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
- package/tsconfig.json +7 -2
- package/dist/plugin/assertServerCondition.d.ts +0 -6
- package/dist/plugin/assertServerCondition.d.ts.map +0 -1
- package/dist/plugin/assertServerCondition.js +0 -13
- package/dist/plugin/checkFilesExist.d.ts +0 -3
- package/dist/plugin/checkFilesExist.d.ts.map +0 -1
- package/dist/plugin/checkFilesExist.js +0 -67
- package/dist/plugin/checkFilesExist.js.map +0 -1
- package/dist/plugin/collect-manifest-client-files.d.ts +0 -23
- package/dist/plugin/collect-manifest-client-files.d.ts.map +0 -1
- package/dist/plugin/collect-manifest-client-files.js +0 -131
- package/dist/plugin/collect-manifest-client-files.js.map +0 -1
- package/dist/plugin/config/getWorkerPath.d.ts +0 -2
- package/dist/plugin/config/getWorkerPath.d.ts.map +0 -1
- package/dist/plugin/config/getWorkerPath.js +0 -4
- package/dist/plugin/copy-dir.d.ts +0 -4
- package/dist/plugin/copy-dir.d.ts.map +0 -1
- package/dist/plugin/copy-dir.js +0 -25
- package/dist/plugin/copy-dir.js.map +0 -1
- package/dist/plugin/css-collector-inline.d.ts +0 -10
- package/dist/plugin/css-collector-inline.d.ts.map +0 -1
- package/dist/plugin/css-collector-inline.js +0 -55
- package/dist/plugin/css-collector-inline.js.map +0 -1
- package/dist/plugin/loader/css-loader.d.ts +0 -16
- package/dist/plugin/loader/css-loader.d.ts.map +0 -1
- package/dist/plugin/loader/css-loader.js +0 -70
- package/dist/plugin/loader/css-loader.js.map +0 -1
- package/dist/plugin/react-client/index.js.map +0 -1
- package/dist/plugin/react-server/index.js.map +0 -1
- package/dist/plugin/worker/html/renderPages.d.ts +0 -26
- package/dist/plugin/worker/html/renderPages.d.ts.map +0 -1
- package/dist/plugin/worker/html/renderPages.js +0 -241
- package/dist/plugin/worker/html/renderPages.js.map +0 -1
- package/plugin/assertServerCondition.ts +0 -12
- package/plugin/checkFilesExist.ts +0 -66
- package/plugin/collect-manifest-client-files.ts +0 -167
- package/plugin/config/getWorkerPath.ts +0 -5
- package/plugin/copy-dir.ts +0 -27
- package/plugin/css-collector-inline.tsx +0 -60
- package/plugin/helpers/createRscStream.ts +0 -109
- package/plugin/loader/css-loader.ts +0 -94
- package/plugin/worker/html/messageHandler.ts +0 -130
- package/plugin/worker/html/renderPages.ts +0 -293
- package/scripts/react+0.0.0-experimental-eda36a1c-20250228.patch +0 -159
- package/scripts/react-dom+0.0.0-experimental-eda36a1c-20250228.patch +0 -12508
|
@@ -1,37 +1,26 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { RenderToPipeableStreamOptions } from "react-dom/server";
|
|
2
|
+
import type { CreateHandlerOptions, CssContent, StreamMetrics } from "../types.js";
|
|
2
3
|
export interface WorkerMessage {
|
|
3
4
|
type: string;
|
|
4
5
|
id: string;
|
|
5
6
|
}
|
|
6
|
-
export interface
|
|
7
|
-
bootstrapModules?: string[];
|
|
8
|
-
bootstrapScripts?: string[];
|
|
9
|
-
bootstrapScriptContent?: string;
|
|
10
|
-
signal?: AbortSignal;
|
|
7
|
+
export interface ReactServerDomEsmOptions {
|
|
11
8
|
identifierPrefix?: string;
|
|
12
9
|
namespaceURI?: string;
|
|
13
10
|
nonce?: string;
|
|
11
|
+
bootstrapScriptContent?: string;
|
|
12
|
+
bootstrapScripts?: string[];
|
|
13
|
+
bootstrapModules?: string[];
|
|
14
14
|
progressiveChunkSize?: number;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
onError?: (error: unknown) => void;
|
|
18
|
-
onPostpone?: (reason: string) => void;
|
|
19
|
-
environmentName?: string;
|
|
15
|
+
temporaryReferences?: WeakMap<any, any>;
|
|
16
|
+
moduleBaseURL?: string;
|
|
20
17
|
importMap?: {
|
|
21
18
|
imports?: Record<string, string>;
|
|
22
19
|
};
|
|
20
|
+
onError?: (error: Error, errorInfo?: any) => void;
|
|
21
|
+
onPostpone?: (reason: string) => void;
|
|
23
22
|
}
|
|
24
|
-
export
|
|
25
|
-
chunks: string[];
|
|
26
|
-
complete: boolean;
|
|
27
|
-
rendered: boolean;
|
|
28
|
-
outDir: string;
|
|
29
|
-
moduleRootPath: string;
|
|
30
|
-
moduleBaseURL: string;
|
|
31
|
-
htmlOutputPath: string;
|
|
32
|
-
id: string;
|
|
33
|
-
pipableStreamOptions: PipeableStreamOptions;
|
|
34
|
-
}
|
|
23
|
+
export type SerializeableRenderToPipeableStreamOptions = Omit<RenderToPipeableStreamOptions, "onShellReady" | "onShellError" | "onAllReady" | "onError" | "onPostpone">;
|
|
35
24
|
export interface RscRenderState {
|
|
36
25
|
id: string;
|
|
37
26
|
outDir: string;
|
|
@@ -40,51 +29,190 @@ export interface RscRenderState {
|
|
|
40
29
|
rscOutputPath: string;
|
|
41
30
|
componentImport: string;
|
|
42
31
|
propsImport: string;
|
|
43
|
-
|
|
32
|
+
pipeableStreamOptions: ReactServerDomEsmOptions;
|
|
44
33
|
}
|
|
45
34
|
export interface ShutdownMessage extends WorkerMessage {
|
|
46
35
|
type: "SHUTDOWN";
|
|
47
36
|
}
|
|
48
|
-
export interface
|
|
49
|
-
type: "
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
37
|
+
export interface ErrorMessage extends WorkerMessage {
|
|
38
|
+
type: "ERROR";
|
|
39
|
+
errorInfo?: any;
|
|
40
|
+
error: string | {
|
|
41
|
+
message: string;
|
|
42
|
+
stack?: string | undefined;
|
|
43
|
+
name: string;
|
|
44
|
+
cause?: any;
|
|
45
|
+
};
|
|
46
|
+
id: string;
|
|
47
|
+
}
|
|
48
|
+
export interface ChunkProcessedMessage extends WorkerMessage {
|
|
49
|
+
type: "CHUNK_PROCESSED";
|
|
50
|
+
success: boolean;
|
|
51
|
+
sequence?: number;
|
|
63
52
|
}
|
|
64
|
-
export interface
|
|
53
|
+
export interface ChunkErrorMessage extends WorkerMessage {
|
|
54
|
+
type: "CHUNK_ERROR";
|
|
55
|
+
error: string;
|
|
56
|
+
sequence?: number;
|
|
57
|
+
}
|
|
58
|
+
export type RscRenderMessage = WorkerMessage & {
|
|
59
|
+
type: "RSC_RENDER";
|
|
60
|
+
} & Omit<CreateHandlerOptions, "onEvent" | "onMetrics" | "loader" | "Html" | "CssCollector" | "logger" | "build" | "autoDiscover"> & {
|
|
61
|
+
build: Omit<CreateHandlerOptions["build"], "entryFileNames" | "chunkFileNames" | "assetFileNames" | "pages"> & {
|
|
62
|
+
pages: string[];
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
export type RscChunkInputMessage = WorkerMessage & {
|
|
65
66
|
type: "RSC_CHUNK";
|
|
66
|
-
chunk:
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
67
|
+
chunk: Buffer;
|
|
68
|
+
sequence: number;
|
|
69
|
+
};
|
|
70
|
+
export type RscChunkOutputMessage = WorkerMessage & {
|
|
71
|
+
type: "RSC_CHUNK";
|
|
72
|
+
id: string;
|
|
73
|
+
chunk: Buffer;
|
|
74
|
+
};
|
|
75
|
+
export interface RscEndMessage extends WorkerMessage {
|
|
76
|
+
type: "RSC_END";
|
|
77
|
+
id: string;
|
|
78
|
+
}
|
|
79
|
+
export interface RscMetricsMessage extends WorkerMessage {
|
|
80
|
+
type: "RSC_METRICS";
|
|
81
|
+
id: string;
|
|
82
|
+
metrics: StreamMetrics;
|
|
72
83
|
}
|
|
73
|
-
export interface
|
|
84
|
+
export interface ShellReadyMessage extends WorkerMessage {
|
|
74
85
|
type: "SHELL_READY";
|
|
75
86
|
}
|
|
76
|
-
export interface
|
|
87
|
+
export interface AllReadyMessage extends WorkerMessage {
|
|
77
88
|
type: "ALL_READY";
|
|
78
|
-
|
|
79
|
-
contents: string;
|
|
89
|
+
id: string;
|
|
80
90
|
}
|
|
81
|
-
export interface
|
|
82
|
-
type: "
|
|
91
|
+
export interface ShellErrorMessage extends WorkerMessage {
|
|
92
|
+
type: "SHELL_ERROR";
|
|
93
|
+
id: string;
|
|
94
|
+
error: {
|
|
95
|
+
message: string;
|
|
96
|
+
stack?: string | undefined;
|
|
97
|
+
name: string;
|
|
98
|
+
cause?: any;
|
|
99
|
+
};
|
|
83
100
|
}
|
|
84
|
-
export interface
|
|
85
|
-
type: "
|
|
86
|
-
|
|
101
|
+
export interface CssFileMessage {
|
|
102
|
+
type: "CSS_FILE";
|
|
103
|
+
id: string;
|
|
104
|
+
content: string;
|
|
105
|
+
moduleClasses?: Record<string, string>;
|
|
106
|
+
originalClasses?: Record<string, string>;
|
|
107
|
+
usedClasses?: string[];
|
|
87
108
|
}
|
|
109
|
+
export type ExtendedCssContent = CssContent & {
|
|
110
|
+
usedClasses?: string[];
|
|
111
|
+
};
|
|
112
|
+
export type HtmlWorkerInputMessage = RscChunkInputMessage | RscEndMessage | ShutdownMessage | {
|
|
113
|
+
type: "CLEANUP";
|
|
114
|
+
id: string;
|
|
115
|
+
} | {
|
|
116
|
+
type: "FORCE_CLEANUP";
|
|
117
|
+
id: string;
|
|
118
|
+
} | {
|
|
119
|
+
type: "INITIALIZED_REACT_LOADER";
|
|
120
|
+
id: string;
|
|
121
|
+
} | {
|
|
122
|
+
type: "INITIALIZED_CSS_LOADER";
|
|
123
|
+
id: string;
|
|
124
|
+
} | {
|
|
125
|
+
type: "ACKNOWLEDGE";
|
|
126
|
+
id: string;
|
|
127
|
+
error?: string;
|
|
128
|
+
} | {
|
|
129
|
+
type: "HTML_COMPLETE";
|
|
130
|
+
id: string;
|
|
131
|
+
success: boolean;
|
|
132
|
+
html?: string;
|
|
133
|
+
metrics?: StreamMetrics;
|
|
134
|
+
} | {
|
|
135
|
+
type: "ROUTE_READY";
|
|
136
|
+
id: string;
|
|
137
|
+
moduleRootPath: string;
|
|
138
|
+
moduleBaseURL: string;
|
|
139
|
+
projectRoot: string;
|
|
140
|
+
cssFiles: Map<string, CssContent>;
|
|
141
|
+
pipeableStreamOptions: Omit<ReactServerDomEsmOptions, "onError" | "onPostpone">;
|
|
142
|
+
};
|
|
143
|
+
export type HtmlWorkerOutputMessage = {
|
|
144
|
+
type: "HTML_COMPLETE";
|
|
145
|
+
id: string;
|
|
146
|
+
success: boolean;
|
|
147
|
+
html?: string;
|
|
148
|
+
chunks?: string[];
|
|
149
|
+
metrics?: StreamMetrics;
|
|
150
|
+
} | ErrorMessage | ShellReadyMessage | ChunkProcessedMessage | ChunkErrorMessage | AllReadyMessage | ShellErrorMessage | {
|
|
151
|
+
type: "HTML_CHUNK";
|
|
152
|
+
id: string;
|
|
153
|
+
chunk: string;
|
|
154
|
+
encoding: string;
|
|
155
|
+
} | {
|
|
156
|
+
type: "CLEANUP_COMPLETE";
|
|
157
|
+
id: string;
|
|
158
|
+
} | {
|
|
159
|
+
type: "SHUTDOWN_COMPLETE";
|
|
160
|
+
id: string;
|
|
161
|
+
} | HmrAcceptMessage;
|
|
162
|
+
export type InitializedReactLoaderMessage = {
|
|
163
|
+
type: "INITIALIZED_REACT_LOADER";
|
|
164
|
+
id: string;
|
|
165
|
+
port: MessagePort;
|
|
166
|
+
};
|
|
167
|
+
export type InitializedCssLoaderMessage = {
|
|
168
|
+
type: "INITIALIZED_CSS_LOADER";
|
|
169
|
+
id: string;
|
|
170
|
+
port: MessagePort;
|
|
171
|
+
};
|
|
172
|
+
export type InitializedRscWorkerLoaderMessage = {
|
|
173
|
+
type: "INITIALIZED_RSC_WORKER_LOADER";
|
|
174
|
+
id: string;
|
|
175
|
+
};
|
|
176
|
+
export type HmrMessage = {
|
|
177
|
+
path: string;
|
|
178
|
+
};
|
|
179
|
+
export type HmrUpdateMessage = HmrMessage & {
|
|
180
|
+
type: "HMR_UPDATE";
|
|
181
|
+
routes?: string[];
|
|
182
|
+
};
|
|
183
|
+
export type HmrCleanupMessage = HmrMessage & {
|
|
184
|
+
type: "HMR_CLEANUP";
|
|
185
|
+
};
|
|
186
|
+
export type HmrAcceptMessage = HmrMessage & {
|
|
187
|
+
type: "HMR_ACCEPT";
|
|
188
|
+
routes?: string[];
|
|
189
|
+
};
|
|
190
|
+
export type RscWorkerInputMessage = RscRenderMessage | CssFileMessage | ShutdownMessage | ChunkProcessedMessage | ClientComponentMessage | InitializedReactLoaderMessage | InitializedCssLoaderMessage | ModuleRequestMessage | InitializedRscWorkerLoaderMessage | HmrUpdateMessage | HmrAcceptMessage;
|
|
191
|
+
export interface CssFileRequestMessage extends WorkerMessage {
|
|
192
|
+
type: "CSS_FILE_REQUEST";
|
|
193
|
+
id: string;
|
|
194
|
+
path: string;
|
|
195
|
+
}
|
|
196
|
+
export interface ClientComponentMessage extends WorkerMessage {
|
|
197
|
+
type: "CLIENT_COMPONENT";
|
|
198
|
+
url: string;
|
|
199
|
+
source: string;
|
|
200
|
+
}
|
|
201
|
+
export interface ModuleRequestMessage extends WorkerMessage {
|
|
202
|
+
type: "MODULE_REQUEST";
|
|
203
|
+
id: string;
|
|
204
|
+
path: string;
|
|
205
|
+
}
|
|
206
|
+
export interface ModuleResponseMessage extends WorkerMessage {
|
|
207
|
+
type: "MODULE_RESPONSE";
|
|
208
|
+
id: string;
|
|
209
|
+
module: any;
|
|
210
|
+
}
|
|
211
|
+
export interface CssProcessedMessage extends WorkerMessage {
|
|
212
|
+
type: "CSS_PROCESSED";
|
|
213
|
+
id: string;
|
|
214
|
+
}
|
|
215
|
+
export type RscWorkerOutputMessage = RscChunkOutputMessage | RscEndMessage | ShellReadyMessage | AllReadyMessage | ErrorMessage | CssFileMessage | CssFileRequestMessage | ClientComponentMessage | ModuleRequestMessage | ModuleResponseMessage | CssProcessedMessage | RscMetricsMessage;
|
|
88
216
|
export interface ClientReferenceMessage extends WorkerMessage {
|
|
89
217
|
type: "CLIENT_REFERENCE";
|
|
90
218
|
location: string;
|
|
@@ -99,31 +227,45 @@ export interface ServerReferenceMessage extends WorkerMessage {
|
|
|
99
227
|
}
|
|
100
228
|
export interface WorkerRscChunkMessage extends WorkerMessage {
|
|
101
229
|
type: "RSC_CHUNK";
|
|
102
|
-
chunk:
|
|
230
|
+
chunk: ArrayBufferLike;
|
|
103
231
|
moduleRootPath: string;
|
|
104
232
|
moduleBaseURL: string;
|
|
105
|
-
|
|
106
|
-
htmlOutputPath: string;
|
|
107
|
-
pipableStreamOptions: PipeableStreamOptions;
|
|
108
|
-
clientManifest: Manifest;
|
|
109
|
-
serverManifest: Manifest;
|
|
233
|
+
pipeableStreamOptions: Omit<ReactServerDomEsmOptions, "onError" | "onPostpone">;
|
|
110
234
|
}
|
|
111
|
-
export
|
|
112
|
-
type: "
|
|
113
|
-
}
|
|
114
|
-
export interface AllReadyMessage extends WorkerMessage {
|
|
115
|
-
type: "ALL_READY";
|
|
116
|
-
outputPath: string;
|
|
117
|
-
html: string;
|
|
118
|
-
}
|
|
119
|
-
export interface CssFileMessage extends WorkerMessage {
|
|
120
|
-
type: "CSS_FILE";
|
|
235
|
+
export type BuildWorkerMessage = {
|
|
236
|
+
type: "RUN_BUILD";
|
|
121
237
|
id: string;
|
|
122
|
-
|
|
123
|
-
|
|
238
|
+
options: {
|
|
239
|
+
root: string;
|
|
240
|
+
outDir: string;
|
|
241
|
+
condition: "react-client" | "react-server";
|
|
242
|
+
};
|
|
243
|
+
} | {
|
|
244
|
+
type: "BUILD_RESULT";
|
|
245
|
+
id: string;
|
|
246
|
+
result: {
|
|
247
|
+
type: "success";
|
|
248
|
+
manifest: string | undefined;
|
|
249
|
+
} | {
|
|
250
|
+
type: "error";
|
|
251
|
+
error: Error;
|
|
252
|
+
};
|
|
253
|
+
};
|
|
254
|
+
export interface TransformResult {
|
|
255
|
+
code: string;
|
|
256
|
+
map?: any;
|
|
257
|
+
modules?: {
|
|
258
|
+
[key: string]: {
|
|
259
|
+
locals: Record<string, string>;
|
|
260
|
+
exports: Record<string, string>;
|
|
261
|
+
};
|
|
262
|
+
};
|
|
124
263
|
}
|
|
125
|
-
export type
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
264
|
+
export type LoaderMessage = {
|
|
265
|
+
type: "LOADER_PORTS" | "REGISTER_LOADER";
|
|
266
|
+
ports?: Record<string, MessagePort>;
|
|
267
|
+
key?: string;
|
|
268
|
+
port?: MessagePort;
|
|
269
|
+
importMap?: string;
|
|
270
|
+
};
|
|
129
271
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../plugin/worker/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../plugin/worker/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,KAAK,EACV,oBAAoB,EACpB,UAAU,EACV,aAAa,EACd,MAAM,aAAa,CAAC;AAGrB,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACZ;AAGD,MAAM,WAAW,wBAAwB;IACvC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC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C5C,CAAC;CACH,GACD;IACE,IAAI,EAAE,cAAc,CAAC;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EACF;QACE,IAAI,EAAE,SAAS,CAAC;QAChB,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;KAC9B,GACD;QACE,IAAI,EAAE,OAAO,CAAC;QACd,KAAK,EAAE,KAAK,CAAC;KACd,CAAC;CACP,CAAC;AAEN,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,GAAG,CAAC;IACV,OAAO,CAAC,EAAE;QACR,CAAC,GAAG,EAAE,MAAM,GAAG;YACb,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;YAC/B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;SACjC,CAAC;KACH,CAAC;CACH;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,cAAc,GAAG,iBAAiB,CAAC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IACpC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC"}
|
package/dist/server.d.ts
CHANGED
package/dist/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../server.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../server.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAA;AAGjE,mBAAmB,mBAAmB,CAAA"}
|
package/dist/server.js
CHANGED
|
@@ -3,5 +3,10 @@
|
|
|
3
3
|
* Copyright (c) Nico Brinkkemper
|
|
4
4
|
* MIT License
|
|
5
5
|
*/
|
|
6
|
-
export { vitePluginReactServer } from './plugin/
|
|
6
|
+
export { vitePluginReactServer } from './plugin/plugin.server.js';
|
|
7
|
+
|
|
8
|
+
const condition = process.env["NODE_OPTIONS"]?.match(/--conditions[= ]react-server/) ? "server" : "client";
|
|
9
|
+
if (condition !== "server") {
|
|
10
|
+
throw new Error("Condition mismatch, should be react-server but got " + process.env["NODE_OPTIONS"]);
|
|
11
|
+
}
|
|
7
12
|
//# sourceMappingURL=server.js.map
|
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"server.js","sources":["../server.ts"],"sourcesContent":["\"use strict\";\n\nconst condition = process.env['NODE_OPTIONS']?.match(/--conditions[= ]react-server/) ? 'server' : 'client'\n\nif(condition !== 'server'){\n throw new Error('Condition mismatch, should be react-server but got ' + process.env['NODE_OPTIONS']);\n}\n\nexport { vitePluginReactServer } from './plugin/plugin.server.js'\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;AAElG,IAAG,cAAc,QAAS,EAAA;AACxB,EAAA,MAAM,IAAI,KAAM,CAAA,qDAAA,GAAwD,OAAQ,CAAA,GAAA,CAAI,cAAc,CAAC,CAAA;AACrG"}
|