vite-plugin-react-server 0.3.4 → 0.3.6
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 +113 -222
- package/bin/patch.mjs +84 -0
- package/dist/client.d.ts +3 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +7 -0
- package/dist/client.js.map +1 -0
- package/dist/index.d.ts +7 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +32 -3
- package/dist/index.js.map +1 -1
- package/dist/node_modules/magic-string/dist/magic-string.es.js +1283 -0
- package/dist/node_modules/magic-string/dist/magic-string.es.js.map +1 -0
- package/dist/package.json +130 -0
- package/dist/plugin/assertServerCondition.d.ts.map +1 -0
- package/dist/plugin/assertServerCondition.js +15 -0
- package/dist/plugin/build/createClientBuildConfig.d.ts +3 -0
- package/dist/plugin/build/createClientBuildConfig.d.ts.map +1 -0
- package/dist/plugin/build/createClientBuildConfig.js +14 -0
- package/dist/plugin/build/createServerBuildConfig.d.ts +12 -0
- package/dist/plugin/build/createServerBuildConfig.d.ts.map +1 -0
- package/dist/plugin/build/createServerBuildConfig.js +40 -0
- package/dist/plugin/build/createSharedBuildConfig.d.ts +5 -0
- package/dist/plugin/build/createSharedBuildConfig.d.ts.map +1 -0
- package/dist/plugin/build/createSharedBuildConfig.js +28 -0
- package/dist/plugin/build/mergeInputs.d.ts +9 -0
- package/dist/plugin/build/mergeInputs.d.ts.map +1 -0
- package/dist/plugin/build/mergeInputs.js +56 -0
- package/dist/plugin/checkFilesExist.d.ts +3 -0
- package/dist/plugin/checkFilesExist.d.ts.map +1 -0
- package/dist/plugin/checkFilesExist.js +78 -0
- package/dist/plugin/checkFilesExist.js.map +1 -0
- package/dist/{collect-css-manifest.d.ts → plugin/collect-css-manifest.d.ts} +2 -2
- package/dist/plugin/collect-css-manifest.d.ts.map +1 -0
- package/dist/{src → plugin}/collect-css-manifest.js +8 -5
- package/dist/plugin/collect-css-manifest.js.map +1 -0
- package/dist/plugin/components.d.ts.map +1 -0
- package/dist/{src → plugin}/components.js +9 -4
- package/dist/plugin/components.js.map +1 -0
- package/dist/plugin/config/defaults.d.ts +51 -0
- package/dist/plugin/config/defaults.d.ts.map +1 -0
- package/dist/plugin/config/defaults.js +52 -0
- package/dist/plugin/config/defaults.js.map +1 -0
- package/dist/plugin/config/getCondition.d.ts +2 -0
- package/dist/plugin/config/getCondition.d.ts.map +1 -0
- package/dist/plugin/config/getCondition.js +11 -0
- package/dist/plugin/config/getCondition.js.map +1 -0
- package/dist/plugin/config/getPaths.d.ts +5 -0
- package/dist/plugin/config/getPaths.d.ts.map +1 -0
- package/dist/plugin/config/getPaths.js +21 -0
- package/dist/plugin/config/getPaths.js.map +1 -0
- package/dist/plugin/config/getWorkerPath.d.ts +2 -0
- package/dist/plugin/config/getWorkerPath.d.ts.map +1 -0
- package/dist/plugin/config/getWorkerPath.js +4 -0
- package/dist/plugin/config/index.d.ts +8 -0
- package/dist/plugin/config/index.d.ts.map +1 -0
- package/dist/plugin/config/index.js +7 -0
- package/dist/plugin/config/moduleIdDefault.d.ts +8 -0
- package/dist/plugin/config/moduleIdDefault.d.ts.map +1 -0
- package/dist/plugin/config/moduleIdDefault.js +23 -0
- package/dist/plugin/config/moduleIdDefault.js.map +1 -0
- package/dist/plugin/config/resolveOptions.d.ts +9 -0
- package/dist/plugin/config/resolveOptions.d.ts.map +1 -0
- package/dist/plugin/config/resolveOptions.js +56 -0
- package/dist/plugin/config/resolveOptions.js.map +1 -0
- package/dist/plugin/config/resolvePages.d.ts +9 -0
- package/dist/plugin/config/resolvePages.d.ts.map +1 -0
- package/dist/plugin/config/resolvePages.js +38 -0
- package/dist/plugin/config/resolvePages.js.map +1 -0
- package/dist/plugin/config/resolveUserConfig.d.ts +18 -0
- package/dist/plugin/config/resolveUserConfig.d.ts.map +1 -0
- package/dist/plugin/config/resolveUserConfig.js +84 -0
- package/dist/plugin/config/resolveUserConfig.js.map +1 -0
- package/dist/plugin/copy-dir.d.ts.map +1 -0
- package/dist/plugin/copy-dir.js +20 -0
- package/dist/plugin/getCondition.d.ts +2 -0
- package/dist/plugin/getCondition.d.ts.map +1 -0
- package/dist/plugin/getCondition.js +1 -0
- package/dist/plugin/getEnv.d.ts.map +1 -0
- package/dist/plugin/getEnv.js +107 -0
- package/dist/plugin/helpers/createClientInputNormalizer.d.ts +8 -0
- package/dist/plugin/helpers/createClientInputNormalizer.d.ts.map +1 -0
- package/dist/plugin/helpers/createClientInputNormalizer.js +35 -0
- package/dist/plugin/helpers/createServerInputNormalizer.d.ts +9 -0
- package/dist/plugin/helpers/createServerInputNormalizer.d.ts.map +1 -0
- package/dist/plugin/helpers/createServerInputNormalizer.js +37 -0
- package/dist/plugin/helpers/createStaticInputNormalizer.d.ts +7 -0
- package/dist/plugin/helpers/createStaticInputNormalizer.d.ts.map +1 -0
- package/dist/plugin/helpers/createStaticInputNormalizer.js +18 -0
- package/dist/plugin/helpers/getModuleManifest.d.ts +12 -0
- package/dist/plugin/helpers/getModuleManifest.d.ts.map +1 -0
- package/dist/plugin/helpers/getModuleManifest.js +24 -0
- package/dist/plugin/helpers/getModuleManifest.js.map +1 -0
- package/dist/plugin/helpers/inputNormalizer.d.ts +3 -0
- package/dist/plugin/helpers/inputNormalizer.d.ts.map +1 -0
- package/dist/plugin/helpers/inputNormalizer.js +35 -0
- package/dist/plugin/helpers/inputNormalizer.js.map +1 -0
- package/dist/plugin/helpers/inputNormalizerWorker.d.ts +11 -0
- package/dist/plugin/helpers/inputNormalizerWorker.d.ts.map +1 -0
- package/dist/plugin/helpers/inputNormalizerWorker.js +30 -0
- package/dist/plugin/helpers/normalizedRelativePath.d.ts.map +1 -0
- package/dist/plugin/helpers/normalizedRelativePath.js +36 -0
- package/dist/plugin/helpers/resolveFilePath.d.ts +13 -0
- package/dist/plugin/helpers/resolveFilePath.d.ts.map +1 -0
- package/dist/plugin/helpers/resolveFilePath.js +74 -0
- package/dist/plugin/helpers/resolveWorkerModule.d.ts +6 -0
- package/dist/plugin/helpers/resolveWorkerModule.d.ts.map +1 -0
- package/dist/plugin/helpers/resolveWorkerModule.js +24 -0
- package/dist/plugin/helpers/tryManifest.d.ts.map +1 -0
- package/dist/{src → plugin}/helpers/tryManifest.js +11 -6
- package/dist/plugin/helpers/tryManifest.js.map +1 -0
- package/dist/plugin/helpers/validateModuleBase.d.ts +3 -0
- package/dist/plugin/helpers/validateModuleBase.d.ts.map +1 -0
- package/dist/plugin/helpers/validateModuleBase.js +16 -0
- package/dist/plugin/helpers/validateResolvedConfig.d.ts +3 -0
- package/dist/plugin/helpers/validateResolvedConfig.d.ts.map +1 -0
- package/dist/plugin/helpers/validateResolvedConfig.js +17 -0
- package/dist/plugin/index.d.ts +3 -0
- package/dist/plugin/index.d.ts.map +1 -0
- package/dist/plugin/index.js +1 -0
- package/dist/plugin/loader/createBuildLoader.d.ts +9 -0
- package/dist/plugin/loader/createBuildLoader.d.ts.map +1 -0
- package/dist/plugin/loader/createBuildLoader.js +38 -0
- package/dist/plugin/loader/createBuildLoader.js.map +1 -0
- package/dist/plugin/loader/createCssLoader.d.ts +30 -0
- package/dist/plugin/loader/createCssLoader.d.ts.map +1 -0
- package/dist/plugin/loader/createCssLoader.js +35 -0
- package/dist/{html → plugin/loader}/createPageLoader.d.ts +2 -4
- package/dist/plugin/loader/createPageLoader.d.ts.map +1 -0
- package/dist/plugin/loader/createPageLoader.js +57 -0
- package/dist/plugin/manifest.d.ts.map +1 -0
- package/dist/plugin/manifest.js +13 -0
- package/dist/plugin/module-graph.d.ts.map +1 -0
- package/dist/plugin/module-graph.js +35 -0
- package/dist/plugin/plugin.d.ts +7 -0
- package/dist/plugin/plugin.d.ts.map +1 -0
- package/dist/plugin/plugin.js +8 -0
- package/dist/plugin/preserver/index.d.ts +2 -0
- package/dist/plugin/preserver/index.d.ts.map +1 -0
- package/dist/plugin/preserver/index.js +1 -0
- package/dist/plugin/preserver/plugin.d.ts +3 -0
- package/dist/plugin/preserver/plugin.d.ts.map +1 -0
- package/dist/plugin/preserver/plugin.js +90 -0
- package/dist/plugin/preserver/plugin.js.map +1 -0
- package/dist/plugin/react-client/index.d.ts +2 -0
- package/dist/plugin/react-client/index.d.ts.map +1 -0
- package/dist/plugin/react-client/index.js +1 -0
- package/dist/plugin/react-client/plugin.d.ts +4 -0
- package/dist/plugin/react-client/plugin.d.ts.map +1 -0
- package/dist/plugin/react-client/plugin.js +34 -0
- package/dist/plugin/react-client/plugin.js.map +1 -0
- package/dist/plugin/react-server/createDevMiddleware.d.ts.map +1 -0
- package/dist/plugin/react-server/createDevMiddleware.js +68 -0
- package/dist/plugin/react-server/createDevServer.d.ts.map +1 -0
- package/dist/plugin/react-server/createDevServer.js +4 -0
- package/dist/plugin/react-server/createHandler.d.ts +17 -0
- package/dist/plugin/react-server/createHandler.d.ts.map +1 -0
- package/dist/{src → plugin}/react-server/createHandler.js +28 -17
- package/dist/plugin/react-server/createHandler.js.map +1 -0
- package/dist/plugin/react-server/createReactNodeStreamer.d.ts.map +1 -0
- package/dist/plugin/react-server/createReactNodeStreamer.js +7 -0
- package/dist/{react-server → plugin/react-server}/createRscStream.d.ts +1 -1
- package/dist/plugin/react-server/createRscStream.d.ts.map +1 -0
- package/dist/{src → plugin}/react-server/createRscStream.js +14 -13
- package/dist/plugin/react-server/createRscStream.js.map +1 -0
- package/dist/{react-server → plugin/react-server}/createSsrHandler.d.ts +1 -1
- package/dist/plugin/react-server/createSsrHandler.d.ts.map +1 -0
- package/dist/plugin/react-server/createSsrHandler.js +102 -0
- package/dist/plugin/react-server/index.d.ts +3 -0
- package/dist/plugin/react-server/index.d.ts.map +1 -0
- package/dist/plugin/react-server/index.js +10 -0
- package/dist/plugin/react-server/plugin.d.ts +7 -0
- package/dist/plugin/react-server/plugin.d.ts.map +1 -0
- package/dist/plugin/react-server/plugin.js +377 -0
- package/dist/plugin/react-server/plugin.js.map +1 -0
- package/dist/plugin/resolvePage.d.ts.map +1 -0
- package/dist/{src → plugin}/resolvePage.js +8 -4
- package/dist/plugin/resolvePage.js.map +1 -0
- package/dist/plugin/resolveProps.d.ts.map +1 -0
- package/dist/{src → plugin}/resolveProps.js +21 -8
- package/dist/plugin/resolveProps.js.map +1 -0
- package/dist/plugin/server.d.ts +2 -0
- package/dist/plugin/server.d.ts.map +1 -0
- package/dist/plugin/server.js +1 -0
- package/dist/plugin/transformer/index.d.ts +2 -0
- package/dist/plugin/transformer/index.d.ts.map +1 -0
- package/dist/plugin/transformer/index.js +1 -0
- package/dist/{transformer/index.d.ts → plugin/transformer/plugin.d.ts} +3 -4
- package/dist/plugin/transformer/plugin.d.ts.map +1 -0
- package/dist/plugin/transformer/plugin.js +94 -0
- package/dist/plugin/transformer/plugin.js.map +1 -0
- package/dist/plugin/transformer/transformer-client-components.d.ts +21 -0
- package/dist/plugin/transformer/transformer-client-components.d.ts.map +1 -0
- package/dist/plugin/transformer/transformer-client-components.js +61 -0
- package/dist/plugin/transformer/transformer-client-components.js.map +1 -0
- package/dist/{transformer/transformer.d.ts → plugin/transformer/transformer-server-actions.d.ts} +3 -4
- package/dist/plugin/transformer/transformer-server-actions.d.ts.map +1 -0
- package/dist/plugin/transformer/transformer-server-actions.js +76 -0
- package/dist/plugin/transformer/transformer-server-actions.js.map +1 -0
- package/dist/plugin/transformer/types.d.ts.map +1 -0
- package/dist/plugin/transformer/types.js +1 -0
- package/dist/plugin/types.d.ts +225 -0
- package/dist/plugin/types.d.ts.map +1 -0
- package/dist/plugin/types.js +1 -0
- package/dist/plugin/worker/createWorker.d.ts +15 -0
- package/dist/plugin/worker/createWorker.d.ts.map +1 -0
- package/dist/plugin/worker/createWorker.js +71 -0
- package/dist/plugin/worker/createWorker.js.map +1 -0
- package/dist/plugin/worker/html/html-worker.d.ts +2 -0
- package/dist/plugin/worker/html/html-worker.d.ts.map +1 -0
- package/dist/plugin/worker/html/html-worker.development.d.ts +2 -0
- package/dist/plugin/worker/html/html-worker.development.d.ts.map +1 -0
- package/dist/plugin/worker/html/html-worker.development.js +12 -0
- package/dist/plugin/worker/html/html-worker.development.js.map +1 -0
- package/dist/plugin/worker/html/html-worker.js +4 -0
- package/dist/plugin/worker/html/html-worker.production.d.ts +2 -0
- package/dist/plugin/worker/html/html-worker.production.d.ts.map +1 -0
- package/dist/plugin/worker/html/html-worker.production.js +12 -0
- package/dist/plugin/worker/html/html-worker.production.js.map +1 -0
- package/dist/plugin/worker/html/index.d.ts +2 -0
- package/dist/plugin/worker/html/index.d.ts.map +1 -0
- package/dist/plugin/worker/html/index.js +7 -0
- package/dist/plugin/worker/html/index.js.map +1 -0
- package/dist/plugin/worker/html/messageHandler.d.ts +3 -0
- package/dist/plugin/worker/html/messageHandler.d.ts.map +1 -0
- package/dist/plugin/worker/html/messageHandler.js +98 -0
- package/dist/plugin/worker/html/messageHandler.js.map +1 -0
- package/dist/plugin/worker/html/plugin.d.ts +4 -0
- package/dist/plugin/worker/html/plugin.d.ts.map +1 -0
- package/dist/plugin/worker/html/plugin.js +89 -0
- package/dist/plugin/worker/html/renderPages.d.ts +38 -0
- package/dist/plugin/worker/html/renderPages.d.ts.map +1 -0
- package/dist/plugin/worker/html/renderPages.js +123 -0
- package/dist/plugin/worker/html/renderPages.js.map +1 -0
- package/dist/plugin/worker/loader.d.ts.map +1 -0
- package/dist/plugin/worker/loader.js +11 -0
- package/dist/plugin/worker/loader.js.map +1 -0
- package/dist/plugin/worker/plugin.d.ts +10 -0
- package/dist/plugin/worker/plugin.d.ts.map +1 -0
- package/dist/plugin/worker/plugin.js +14 -0
- package/dist/plugin/worker/rsc/createRscStream.d.ts +5 -0
- package/dist/plugin/worker/rsc/createRscStream.d.ts.map +1 -0
- package/dist/plugin/worker/rsc/createRscStream.js +39 -0
- package/dist/plugin/worker/rsc/createRscStream.js.map +1 -0
- package/dist/plugin/worker/rsc/development.d.ts +5 -0
- package/dist/plugin/worker/rsc/development.d.ts.map +1 -0
- package/dist/plugin/worker/rsc/development.js +13 -0
- package/dist/plugin/worker/rsc/development.js.map +1 -0
- package/dist/plugin/worker/rsc/index.d.ts +4 -0
- package/dist/plugin/worker/rsc/index.d.ts.map +1 -0
- package/dist/plugin/worker/rsc/index.js +15 -0
- package/dist/plugin/worker/rsc/index.js.map +1 -0
- package/dist/plugin/worker/rsc/plugin.d.ts +4 -0
- package/dist/plugin/worker/rsc/plugin.d.ts.map +1 -0
- package/dist/plugin/worker/rsc/plugin.js +82 -0
- package/dist/plugin/worker/rsc/plugin.js.map +1 -0
- package/dist/plugin/worker/rsc/production.d.ts +5 -0
- package/dist/plugin/worker/rsc/production.d.ts.map +1 -0
- package/dist/plugin/worker/rsc/production.js +13 -0
- package/dist/plugin/worker/rsc/production.js.map +1 -0
- package/dist/plugin/worker/rsc/rsc-worker.d.ts +2 -0
- package/dist/plugin/worker/rsc/rsc-worker.d.ts.map +1 -0
- package/dist/plugin/worker/rsc/rsc-worker.js +106 -0
- package/dist/plugin/worker/types.d.ts +99 -0
- package/dist/plugin/worker/types.d.ts.map +1 -0
- package/dist/plugin/worker/types.js +1 -0
- package/dist/server.d.ts +4 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +9 -0
- package/dist/server.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types.d.ts +1 -201
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -0
- package/package.json +42 -25
- package/plugin/build/createClientBuildConfig.ts +21 -0
- package/plugin/build/createServerBuildConfig.ts +66 -0
- package/plugin/build/createSharedBuildConfig.ts +35 -0
- package/plugin/build/mergeInputs.ts +58 -0
- package/plugin/checkFilesExist.ts +82 -0
- package/{src → plugin}/collect-css-manifest.ts +4 -2
- package/plugin/config/defaults.ts +44 -0
- package/plugin/config/getCondition.ts +3 -0
- package/plugin/config/getPaths.ts +25 -0
- package/plugin/config/getWorkerPath.ts +5 -0
- package/plugin/config/index.ts +8 -0
- package/plugin/config/moduleIdDefault.ts +23 -0
- package/plugin/config/resolveOptions.ts +53 -0
- package/plugin/config/resolvePages.ts +43 -0
- package/plugin/config/resolveUserConfig.ts +97 -0
- package/{src → plugin}/getEnv.ts +1 -1
- package/plugin/helpers/createClientInputNormalizer.ts +48 -0
- package/plugin/helpers/createServerInputNormalizer.ts +52 -0
- package/plugin/helpers/createStaticInputNormalizer.ts +26 -0
- package/plugin/helpers/getModuleManifest.ts +31 -0
- package/plugin/helpers/inputNormalizer.ts +39 -0
- package/plugin/helpers/inputNormalizerWorker.ts +47 -0
- package/plugin/helpers/resolveFilePath.ts +108 -0
- package/plugin/helpers/resolveWorkerModule.ts +41 -0
- package/plugin/helpers/validateModuleBase.ts +30 -0
- package/plugin/helpers/validateResolvedConfig.ts +21 -0
- package/plugin/index.ts +2 -0
- package/plugin/loader/createBuildLoader.ts +44 -0
- package/plugin/loader/createCssLoader.ts +73 -0
- package/{src/html → plugin/loader}/createPageLoader.ts +35 -27
- package/plugin/plugin.ts +8 -0
- package/plugin/preserver/index.ts +1 -0
- package/plugin/preserver/plugin.ts +109 -0
- package/plugin/react-client/index.ts +1 -0
- package/plugin/react-client/plugin.ts +33 -0
- package/{src → plugin}/react-server/createDevMiddleware.ts +17 -1
- package/{src → plugin}/react-server/createDevServer.ts +0 -1
- package/{src → plugin}/react-server/createHandler.ts +31 -10
- package/{src → plugin}/react-server/createReactNodeStreamer.ts +1 -0
- package/{src → plugin}/react-server/createRscStream.ts +8 -12
- package/{src → plugin}/react-server/createSsrHandler.ts +16 -19
- package/plugin/react-server/index.ts +12 -0
- package/plugin/react-server/plugin.ts +464 -0
- package/{src → plugin}/resolvePage.ts +1 -1
- package/{src → plugin}/resolveProps.ts +15 -6
- package/plugin/server.tsx +0 -0
- package/plugin/transformer/index.ts +1 -0
- package/plugin/transformer/plugin.ts +141 -0
- package/plugin/transformer/transformer-client-components.ts +94 -0
- package/{src/transformer/transformer.ts → plugin/transformer/transformer-server-actions.ts} +14 -27
- package/{src → plugin}/types.ts +97 -55
- package/plugin/worker/createWorker.ts +84 -0
- package/plugin/worker/html/html-worker.development.tsx +8 -0
- package/plugin/worker/html/html-worker.production.tsx +8 -0
- package/plugin/worker/html/html-worker.ts +5 -0
- package/plugin/worker/html/index.ts +5 -0
- package/plugin/worker/html/messageHandler.ts +116 -0
- package/plugin/worker/html/plugin.ts +97 -0
- package/plugin/worker/html/renderPages.ts +188 -0
- package/plugin/worker/plugin.ts +17 -0
- package/plugin/worker/rsc/createRscStream.ts +42 -0
- package/plugin/worker/rsc/development.ts +6 -0
- package/plugin/worker/rsc/index.ts +14 -0
- package/plugin/worker/rsc/plugin.ts +83 -0
- package/plugin/worker/rsc/production.ts +6 -0
- package/plugin/worker/rsc/rsc-worker.tsx +128 -0
- package/plugin/worker/types.ts +124 -0
- package/scripts/check-react-version.mjs +48 -30
- package/scripts/react+0.0.0-experimental-b3a95caf-20250113.patch +4291 -0
- package/scripts/react-dom+0.0.0-experimental-b3a95caf-20250113.patch +108798 -0
- package/scripts/react-server-dom-esm+0.0.0-experimental-b3a95caf-20250113.patch +24775 -0
- package/{patches → scripts}/react-server-dom-esm+0.0.1.patch +11354 -3
- package/tsconfig.json +15 -13
- package/dist/assertServerCondition.d.ts.map +0 -1
- package/dist/bin/patch.js +0 -51
- package/dist/bin/patch.js.map +0 -1
- package/dist/build/createBuildConfig.d.ts +0 -13
- package/dist/build/createBuildConfig.d.ts.map +0 -1
- package/dist/build/mergeInputs.d.ts +0 -5
- package/dist/build/mergeInputs.d.ts.map +0 -1
- package/dist/checkFilesExist.d.ts +0 -8
- package/dist/checkFilesExist.d.ts.map +0 -1
- package/dist/collect-css-manifest.d.ts.map +0 -1
- package/dist/components.d.ts.map +0 -1
- package/dist/copy-dir.d.ts.map +0 -1
- package/dist/getEnv.d.ts.map +0 -1
- package/dist/helpers/inputNormalizer.d.ts +0 -6
- package/dist/helpers/inputNormalizer.d.ts.map +0 -1
- package/dist/helpers/normalizedRelativePath.d.ts.map +0 -1
- package/dist/helpers/tryManifest.d.ts.map +0 -1
- package/dist/html/createPageLoader.d.ts.map +0 -1
- package/dist/manifest.d.ts.map +0 -1
- package/dist/module-graph.d.ts.map +0 -1
- package/dist/options.d.ts +0 -91
- package/dist/options.d.ts.map +0 -1
- package/dist/plugin.d.ts +0 -3
- package/dist/plugin.d.ts.map +0 -1
- package/dist/react-client/plugin.d.ts +0 -4
- package/dist/react-client/plugin.d.ts.map +0 -1
- package/dist/react-client/plugin.js +0 -28
- package/dist/react-client/plugin.js.map +0 -1
- package/dist/react-server/createDevMiddleware.d.ts.map +0 -1
- package/dist/react-server/createDevServer.d.ts.map +0 -1
- package/dist/react-server/createHandler.d.ts +0 -23
- package/dist/react-server/createHandler.d.ts.map +0 -1
- package/dist/react-server/createReactNodeStreamer.d.ts.map +0 -1
- package/dist/react-server/createRscStream.d.ts.map +0 -1
- package/dist/react-server/createSsrHandler.d.ts.map +0 -1
- package/dist/react-server/plugin.d.ts +0 -8
- package/dist/react-server/plugin.d.ts.map +0 -1
- package/dist/react-server/plugin.js +0 -345
- package/dist/react-server/plugin.js.map +0 -1
- package/dist/resolvePage.d.ts.map +0 -1
- package/dist/resolveProps.d.ts.map +0 -1
- package/dist/scripts/check-react-version.js +0 -34
- package/dist/scripts/check-react-version.js.map +0 -1
- package/dist/src/build/createBuildConfig.js +0 -44
- package/dist/src/build/createBuildConfig.js.map +0 -1
- package/dist/src/build/mergeInputs.js +0 -16
- package/dist/src/build/mergeInputs.js.map +0 -1
- package/dist/src/checkFilesExist.js +0 -61
- package/dist/src/checkFilesExist.js.map +0 -1
- package/dist/src/collect-css-manifest.js.map +0 -1
- package/dist/src/components.js.map +0 -1
- package/dist/src/getEnv.js +0 -76
- package/dist/src/getEnv.js.map +0 -1
- package/dist/src/helpers/inputNormalizer.js +0 -11
- package/dist/src/helpers/inputNormalizer.js.map +0 -1
- package/dist/src/helpers/normalizedRelativePath.js +0 -34
- package/dist/src/helpers/normalizedRelativePath.js.map +0 -1
- package/dist/src/helpers/tryManifest.js.map +0 -1
- package/dist/src/html/createPageLoader.js +0 -72
- package/dist/src/html/createPageLoader.js.map +0 -1
- package/dist/src/options.js +0 -307
- package/dist/src/options.js.map +0 -1
- package/dist/src/react-server/createHandler.js.map +0 -1
- package/dist/src/react-server/createRscStream.js.map +0 -1
- package/dist/src/resolvePage.js.map +0 -1
- package/dist/src/resolveProps.js.map +0 -1
- package/dist/src/worker/createHtmlStream.js +0 -62
- package/dist/src/worker/createHtmlStream.js.map +0 -1
- package/dist/src/worker/createWorker.js +0 -34
- package/dist/src/worker/createWorker.js.map +0 -1
- package/dist/src/worker/renderPages.js +0 -99
- package/dist/src/worker/renderPages.js.map +0 -1
- package/dist/transformer/index.d.ts.map +0 -1
- package/dist/transformer/preserveDirectives.d.ts +0 -4
- package/dist/transformer/preserveDirectives.d.ts.map +0 -1
- package/dist/transformer/preserver.d.ts +0 -2
- package/dist/transformer/preserver.d.ts.map +0 -1
- package/dist/transformer/transformer.d.ts.map +0 -1
- package/dist/transformer/types.d.ts.map +0 -1
- package/dist/worker/createHtmlStream.d.ts +0 -7
- package/dist/worker/createHtmlStream.d.ts.map +0 -1
- package/dist/worker/createWorker.d.ts +0 -10
- package/dist/worker/createWorker.d.ts.map +0 -1
- package/dist/worker/loader.d.ts.map +0 -1
- package/dist/worker/loader.js +0 -7
- package/dist/worker/loader.js.map +0 -1
- package/dist/worker/renderPages.d.ts +0 -18
- package/dist/worker/renderPages.d.ts.map +0 -1
- package/dist/worker/types.d.ts +0 -31
- package/dist/worker/types.d.ts.map +0 -1
- package/dist/worker/worker.d.ts +0 -7
- package/dist/worker/worker.d.ts.map +0 -1
- package/dist/worker/worker.js +0 -112
- package/dist/worker/worker.js.map +0 -1
- package/src/build/createBuildConfig.ts +0 -57
- package/src/build/mergeInputs.ts +0 -42
- package/src/checkFilesExist.ts +0 -67
- package/src/helpers/inputNormalizer.ts +0 -22
- package/src/index.ts +0 -4
- package/src/options.ts +0 -423
- package/src/plugin.ts +0 -5
- package/src/react-client/plugin.ts +0 -34
- package/src/react-server/plugin.ts +0 -409
- package/src/transformer/index.ts +0 -112
- package/src/transformer/preserveDirectives.ts +0 -100
- package/src/transformer/preserver.ts +0 -47
- package/src/worker/createHtmlStream.ts +0 -76
- package/src/worker/createWorker.ts +0 -44
- package/src/worker/renderPages.ts +0 -144
- package/src/worker/types.ts +0 -38
- package/src/worker/worker.tsx +0 -136
- /package/dist/{assertServerCondition.d.ts → plugin/assertServerCondition.d.ts} +0 -0
- /package/dist/{components.d.ts → plugin/components.d.ts} +0 -0
- /package/dist/{copy-dir.d.ts → plugin/copy-dir.d.ts} +0 -0
- /package/dist/{getEnv.d.ts → plugin/getEnv.d.ts} +0 -0
- /package/dist/{helpers → plugin/helpers}/normalizedRelativePath.d.ts +0 -0
- /package/dist/{helpers → plugin/helpers}/tryManifest.d.ts +0 -0
- /package/dist/{manifest.d.ts → plugin/manifest.d.ts} +0 -0
- /package/dist/{module-graph.d.ts → plugin/module-graph.d.ts} +0 -0
- /package/dist/{react-server → plugin/react-server}/createDevMiddleware.d.ts +0 -0
- /package/dist/{react-server → plugin/react-server}/createDevServer.d.ts +0 -0
- /package/dist/{react-server → plugin/react-server}/createReactNodeStreamer.d.ts +0 -0
- /package/dist/{resolvePage.d.ts → plugin/resolvePage.d.ts} +0 -0
- /package/dist/{resolveProps.d.ts → plugin/resolveProps.d.ts} +0 -0
- /package/dist/{transformer → plugin/transformer}/types.d.ts +0 -0
- /package/dist/{worker → plugin/worker}/loader.d.ts +0 -0
- /package/{src → plugin}/assertServerCondition.ts +0 -0
- /package/{src → plugin}/components.tsx +0 -0
- /package/{src → plugin}/copy-dir.ts +0 -0
- /package/{src/server.tsx → plugin/getCondition.ts} +0 -0
- /package/{src → plugin}/helpers/normalizedRelativePath.ts +0 -0
- /package/{src → plugin}/helpers/tryManifest.ts +0 -0
- /package/{src → plugin}/manifest.ts +0 -0
- /package/{src → plugin}/module-graph.ts +0 -0
- /package/{src → plugin}/transformer/README.md +0 -0
- /package/{src → plugin}/transformer/types.ts +0 -0
- /package/{src → plugin}/worker/loader.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createRscStream.d.ts","sourceRoot":"","sources":["../../../../plugin/worker/rsc/createRscStream.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,wBAAgB,eAAe,CAC7B,WAAW,EAAE,cAAc,EAC3B,WAAW,EAAE,QAAQ,EACrB,UAAU,EAAE,WAAW,GAAG,IAAI,OA+B/B"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* vite-plugin-react-server
|
|
3
|
+
* Copyright (c) Nico Brinkkemper
|
|
4
|
+
* MIT License
|
|
5
|
+
*/
|
|
6
|
+
import { renderToPipeableStream } from 'react-server-dom-esm/server.node';
|
|
7
|
+
|
|
8
|
+
function createRscStream(renderState, writeStream, parentPort) {
|
|
9
|
+
console.log("[createRscStream] Creating stream for:", renderState.id);
|
|
10
|
+
const stream = renderToPipeableStream(renderState.componentImport, {
|
|
11
|
+
onShellReady() {
|
|
12
|
+
console.log("[createRscStream] onShellReady called for:", renderState.id);
|
|
13
|
+
stream.pipe(writeStream);
|
|
14
|
+
},
|
|
15
|
+
onAllReady() {
|
|
16
|
+
console.log("[createRscStream] onAllReady called for:", renderState.id);
|
|
17
|
+
writeStream.on("finish", () => {
|
|
18
|
+
parentPort?.postMessage({
|
|
19
|
+
type: "WROTE_FILE",
|
|
20
|
+
id: renderState.id,
|
|
21
|
+
outputPath: renderState.rscOutputPath
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
},
|
|
25
|
+
onError(error) {
|
|
26
|
+
console.error("[createRscStream] Render error:", error);
|
|
27
|
+
parentPort?.postMessage({
|
|
28
|
+
type: "ERROR",
|
|
29
|
+
error: error instanceof Error ? error.message : String(error),
|
|
30
|
+
id: renderState.id
|
|
31
|
+
});
|
|
32
|
+
stream.abort();
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
return stream;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export { createRscStream };
|
|
39
|
+
//# sourceMappingURL=createRscStream.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createRscStream.js","sources":["../../../../plugin/worker/rsc/createRscStream.ts"],"sourcesContent":["import { renderToPipeableStream \n // @ts-ignore\n} from \"react-server-dom-esm/server.node\";\nimport type { Writable } from \"node:stream\";\nimport type { MessagePort } from \"node:worker_threads\";\nimport type { RscRenderState } from \"../types.js\";\n\nexport function createRscStream(\n renderState: RscRenderState,\n writeStream: Writable,\n parentPort: MessagePort | null\n) {\n console.log(\"[createRscStream] Creating stream for:\", renderState.id);\n\n const stream = renderToPipeableStream(renderState.componentImport, {\n onShellReady() {\n console.log(\"[createRscStream] onShellReady called for:\", renderState.id);\n stream.pipe(writeStream);\n },\n onAllReady() {\n console.log(\"[createRscStream] onAllReady called for:\", renderState.id);\n writeStream.on(\"finish\", () => {\n parentPort?.postMessage({\n type: \"WROTE_FILE\",\n id: renderState.id,\n outputPath: renderState.rscOutputPath\n });\n });\n },\n onError(error: unknown) {\n console.error(\"[createRscStream] Render error:\", error);\n parentPort?.postMessage({\n type: \"ERROR\",\n error: error instanceof Error ? error.message : String(error),\n id: renderState.id\n });\n stream.abort();\n }\n });\n\n return stream;\n}\n"],"names":[],"mappings":";;;;;;;AAOgB,SAAA,eAAA,CACd,WACA,EAAA,WAAA,EACA,UACA,EAAA;AACA,EAAQ,OAAA,CAAA,GAAA,CAAI,wCAA0C,EAAA,WAAA,CAAY,EAAE,CAAA;AAEpE,EAAM,MAAA,MAAA,GAAS,sBAAuB,CAAA,WAAA,CAAY,eAAiB,EAAA;AAAA,IACjE,YAAe,GAAA;AACb,MAAQ,OAAA,CAAA,GAAA,CAAI,4CAA8C,EAAA,WAAA,CAAY,EAAE,CAAA;AACxE,MAAA,MAAA,CAAO,KAAK,WAAW,CAAA;AAAA,KACzB;AAAA,IACA,UAAa,GAAA;AACX,MAAQ,OAAA,CAAA,GAAA,CAAI,0CAA4C,EAAA,WAAA,CAAY,EAAE,CAAA;AACtE,MAAY,WAAA,CAAA,EAAA,CAAG,UAAU,MAAM;AAC7B,QAAA,UAAA,EAAY,WAAY,CAAA;AAAA,UACtB,IAAM,EAAA,YAAA;AAAA,UACN,IAAI,WAAY,CAAA,EAAA;AAAA,UAChB,YAAY,WAAY,CAAA;AAAA,SACzB,CAAA;AAAA,OACF,CAAA;AAAA,KACH;AAAA,IACA,QAAQ,KAAgB,EAAA;AACtB,MAAQ,OAAA,CAAA,KAAA,CAAM,mCAAmC,KAAK,CAAA;AACtD,MAAA,UAAA,EAAY,WAAY,CAAA;AAAA,QACtB,IAAM,EAAA,OAAA;AAAA,QACN,OAAO,KAAiB,YAAA,KAAA,GAAQ,KAAM,CAAA,OAAA,GAAU,OAAO,KAAK,CAAA;AAAA,QAC5D,IAAI,WAAY,CAAA;AAAA,OACjB,CAAA;AACD,MAAA,MAAA,CAAO,KAAM,EAAA;AAAA;AACf,GACD,CAAA;AAED,EAAO,OAAA,MAAA;AACT;;;;"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { createRscStream as devCreateRscStream } from './createRscStream.js';
|
|
2
|
+
import { createWorker as devCreateWorker } from '../createWorker.js';
|
|
3
|
+
export declare const createRscStream: typeof devCreateRscStream;
|
|
4
|
+
export declare const createWorker: typeof devCreateWorker;
|
|
5
|
+
//# sourceMappingURL=development.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"development.d.ts","sourceRoot":"","sources":["../../../../plugin/worker/rsc/development.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC7E,OAAO,EAAE,YAAY,IAAI,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAGrE,eAAO,MAAM,eAAe,2BAAqB,CAAC;AAClD,eAAO,MAAM,YAAY,wBAAkB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* vite-plugin-react-server
|
|
3
|
+
* Copyright (c) Nico Brinkkemper
|
|
4
|
+
* MIT License
|
|
5
|
+
*/
|
|
6
|
+
import { createRscStream as createRscStream$1 } from './createRscStream.js';
|
|
7
|
+
import { createWorker as createWorker$1 } from '../createWorker.js';
|
|
8
|
+
|
|
9
|
+
const createRscStream = createRscStream$1;
|
|
10
|
+
const createWorker = createWorker$1;
|
|
11
|
+
|
|
12
|
+
export { createRscStream, createWorker };
|
|
13
|
+
//# sourceMappingURL=development.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"development.js","sources":["../../../../plugin/worker/rsc/development.ts"],"sourcesContent":["import { createRscStream as devCreateRscStream } from './createRscStream.js';\nimport { createWorker as devCreateWorker } from '../createWorker.js';\n\n// Development-specific implementations\nexport const createRscStream = devCreateRscStream;\nexport const createWorker = devCreateWorker; "],"names":["devCreateRscStream","devCreateWorker"],"mappings":";;;;;;;;AAIO,MAAM,eAAkB,GAAAA;AACxB,MAAM,YAAe,GAAAC;;;;"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { reactRscWorkerPlugin } from "./plugin.js";
|
|
2
|
+
export declare const worker: typeof import("./production.js");
|
|
3
|
+
export declare const createRscStream: typeof import("./createRscStream.js").createRscStream, createWorker: typeof import("../createWorker.js").createWorker;
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../plugin/worker/rsc/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAGnD,eAAO,MAAM,MAAM,kCAIlB,CAAC;AAGF,eAAO,MACL,eAAe,yDACf,YAAY,kDACJ,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* vite-plugin-react-server
|
|
3
|
+
* Copyright (c) Nico Brinkkemper
|
|
4
|
+
* MIT License
|
|
5
|
+
*/
|
|
6
|
+
export { reactRscWorkerPlugin } from './plugin.js';
|
|
7
|
+
|
|
8
|
+
const worker = await (process.env["NODE_ENV"] === "production" ? import('./production.js') : import('./development.js'));
|
|
9
|
+
const {
|
|
10
|
+
createRscStream,
|
|
11
|
+
createWorker
|
|
12
|
+
} = worker;
|
|
13
|
+
|
|
14
|
+
export { createRscStream, createWorker, worker };
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../plugin/worker/rsc/index.ts"],"sourcesContent":["export { reactRscWorkerPlugin } from \"./plugin.js\";\n\n// Dynamic import based on NODE_ENV\nexport const worker = await (\n process.env['NODE_ENV'] === 'production' \n ? import('./production.js') \n : import('./development.js')\n);\n\n// Re-export worker functions\nexport const {\n createRscStream,\n createWorker\n} = worker;\n"],"names":[],"mappings":";;;;;;;AAGa,MAAA,MAAA,GAAS,OACpB,OAAA,CAAQ,GAAI,CAAA,UAAU,CAAM,KAAA,YAAA,GAC1B,OAAO,iBAAiB,CACxB,GAAA,OAAO,kBAAkB,CAAA;AAIhB,MAAA;AAAA,EACX,eAAA;AAAA,EACA;AACF,CAAI,GAAA;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../plugin/worker/rsc/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAGnC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAI1D,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,mBAAmB,GAAG,MAAM,CA2EzE"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* vite-plugin-react-server
|
|
3
|
+
* Copyright (c) Nico Brinkkemper
|
|
4
|
+
* MIT License
|
|
5
|
+
*/
|
|
6
|
+
import { resolve } from 'path';
|
|
7
|
+
import { DEFAULT_CONFIG } from '../../config/defaults.js';
|
|
8
|
+
import { getPluginRoot } from '../../config/getPaths.js';
|
|
9
|
+
|
|
10
|
+
function reactRscWorkerPlugin(options) {
|
|
11
|
+
return {
|
|
12
|
+
name: "vite:react-rsc-worker",
|
|
13
|
+
config(config) {
|
|
14
|
+
const root = config.root ?? process.cwd();
|
|
15
|
+
const pluginRoot = getPluginRoot();
|
|
16
|
+
const rscWorkerPath = typeof options.rscWorkerPath === "string" ? resolve(root, options.rscWorkerPath) : resolve(pluginRoot, DEFAULT_CONFIG.RSC_WORKER_PATH);
|
|
17
|
+
const format = "esm";
|
|
18
|
+
const workerConfig = {
|
|
19
|
+
input: {
|
|
20
|
+
"rsc-worker": rscWorkerPath
|
|
21
|
+
},
|
|
22
|
+
output: {
|
|
23
|
+
format,
|
|
24
|
+
dir: options.build?.server ?? "dist/server",
|
|
25
|
+
// Output to server directory
|
|
26
|
+
entryFileNames: "[name].js",
|
|
27
|
+
preserveModules: true,
|
|
28
|
+
manualChunks: {
|
|
29
|
+
"rsc-worker": [rscWorkerPath]
|
|
30
|
+
},
|
|
31
|
+
resolve: {
|
|
32
|
+
conditions: ["react-server"]
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
return {
|
|
37
|
+
build: {
|
|
38
|
+
rollupOptions: {
|
|
39
|
+
preserveEntrySignatures: "strict",
|
|
40
|
+
input: {
|
|
41
|
+
...workerConfig.input,
|
|
42
|
+
...typeof config.build?.rollupOptions?.input === "object" ? config.build?.rollupOptions?.input : {}
|
|
43
|
+
},
|
|
44
|
+
external: [
|
|
45
|
+
"vite",
|
|
46
|
+
"rollup",
|
|
47
|
+
"react",
|
|
48
|
+
"react-dom",
|
|
49
|
+
"react-dom/server",
|
|
50
|
+
"react-server-dom-esm",
|
|
51
|
+
"react-server-dom-esm/client.node",
|
|
52
|
+
"react-server-dom-esm/server.node",
|
|
53
|
+
"react-server-dom-esm/node-loader",
|
|
54
|
+
"source-map",
|
|
55
|
+
"acorn-loose",
|
|
56
|
+
"webpack-sources",
|
|
57
|
+
"stream",
|
|
58
|
+
"util",
|
|
59
|
+
"crypto",
|
|
60
|
+
"async_hooks",
|
|
61
|
+
"fs",
|
|
62
|
+
"path",
|
|
63
|
+
"worker_threads",
|
|
64
|
+
// if we use node: paths in our code, it should always be catched by below rule.
|
|
65
|
+
/^node:.*/
|
|
66
|
+
],
|
|
67
|
+
output: {
|
|
68
|
+
...workerConfig.output
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
manifest: true,
|
|
72
|
+
// Ensure manifest is generated
|
|
73
|
+
minify: false,
|
|
74
|
+
sourcemap: true
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export { reactRscWorkerPlugin };
|
|
82
|
+
//# sourceMappingURL=plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.js","sources":["../../../../plugin/worker/rsc/plugin.ts"],"sourcesContent":["import type { Plugin } from \"vite\";\nimport { resolve } from \"path\";\nimport type { ModuleFormat } from 'rollup';\nimport type { StreamPluginOptions } from \"../../types.js\";\nimport { DEFAULT_CONFIG } from \"../../config/defaults.js\";\nimport { getPluginRoot } from \"../../config/getPaths.js\";\n\nexport function reactRscWorkerPlugin(options: StreamPluginOptions): Plugin {\n return {\n name: \"vite:react-rsc-worker\",\n config(config) {\n const root = config.root ?? process.cwd();\n const pluginRoot = getPluginRoot();\n const rscWorkerPath = typeof options.rscWorkerPath === 'string' \n ? resolve(root, options.rscWorkerPath) \n : resolve(pluginRoot, DEFAULT_CONFIG.RSC_WORKER_PATH);\n \n const format: ModuleFormat = 'esm';\n\n // Single worker output for server build\n const workerConfig = {\n input: {\n 'rsc-worker': rscWorkerPath,\n },\n output: {\n format,\n dir: options.build?.server ?? 'dist/server', // Output to server directory\n entryFileNames: '[name].js',\n preserveModules: true,\n manualChunks: {\n 'rsc-worker': [rscWorkerPath]\n },\n resolve: {\n conditions: ['react-server'],\n }\n }\n };\n\n return {\n build: {\n rollupOptions: {\n preserveEntrySignatures: 'strict',\n input: {\n ...workerConfig.input,\n ...(typeof config.build?.rollupOptions?.input === 'object' \n ? config.build?.rollupOptions?.input \n : {}),\n },\n external: [\n 'vite',\n 'rollup',\n 'react',\n 'react-dom',\n 'react-dom/server',\n 'react-server-dom-esm',\n 'react-server-dom-esm/client.node',\n 'react-server-dom-esm/server.node',\n 'react-server-dom-esm/node-loader',\n 'source-map',\n 'acorn-loose',\n 'webpack-sources',\n 'stream',\n 'util',\n 'crypto',\n 'async_hooks',\n 'fs',\n 'path',\n 'worker_threads',\n // if we use node: paths in our code, it should always be catched by below rule.\n /^node:.*/,\n ],\n output: {\n ...workerConfig.output,\n }\n },\n manifest: true, // Ensure manifest is generated\n minify: false,\n sourcemap: true,\n }\n };\n },\n };\n}\n"],"names":[],"mappings":";;;;;;;;;AAOO,SAAS,qBAAqB,OAAsC,EAAA;AACzE,EAAO,OAAA;AAAA,IACL,IAAM,EAAA,uBAAA;AAAA,IACN,OAAO,MAAQ,EAAA;AACb,MAAA,MAAM,IAAO,GAAA,MAAA,CAAO,IAAQ,IAAA,OAAA,CAAQ,GAAI,EAAA;AACxC,MAAA,MAAM,aAAa,aAAc,EAAA;AACjC,MAAA,MAAM,aAAgB,GAAA,OAAO,OAAQ,CAAA,aAAA,KAAkB,QACnD,GAAA,OAAA,CAAQ,IAAM,EAAA,OAAA,CAAQ,aAAa,CAAA,GACnC,OAAQ,CAAA,UAAA,EAAY,eAAe,eAAe,CAAA;AAEtD,MAAA,MAAM,MAAuB,GAAA,KAAA;AAG7B,MAAA,MAAM,YAAe,GAAA;AAAA,QACnB,KAAO,EAAA;AAAA,UACL,YAAc,EAAA;AAAA,SAChB;AAAA,QACA,MAAQ,EAAA;AAAA,UACN,MAAA;AAAA,UACA,GAAA,EAAK,OAAQ,CAAA,KAAA,EAAO,MAAU,IAAA,aAAA;AAAA;AAAA,UAC9B,cAAgB,EAAA,WAAA;AAAA,UAChB,eAAiB,EAAA,IAAA;AAAA,UACjB,YAAc,EAAA;AAAA,YACZ,YAAA,EAAc,CAAC,aAAa;AAAA,WAC9B;AAAA,UACA,OAAS,EAAA;AAAA,YACP,UAAA,EAAY,CAAC,cAAc;AAAA;AAC7B;AACF,OACF;AAEA,MAAO,OAAA;AAAA,QACL,KAAO,EAAA;AAAA,UACL,aAAe,EAAA;AAAA,YACb,uBAAyB,EAAA,QAAA;AAAA,YACzB,KAAO,EAAA;AAAA,cACL,GAAG,YAAa,CAAA,KAAA;AAAA,cAChB,GAAI,OAAO,MAAA,CAAO,KAAO,EAAA,aAAA,EAAe,KAAU,KAAA,QAAA,GAC9C,MAAO,CAAA,KAAA,EAAO,aAAe,EAAA,KAAA,GAC7B;AAAC,aACP;AAAA,YACA,QAAU,EAAA;AAAA,cACR,MAAA;AAAA,cACA,QAAA;AAAA,cACA,OAAA;AAAA,cACA,WAAA;AAAA,cACA,kBAAA;AAAA,cACA,sBAAA;AAAA,cACA,kCAAA;AAAA,cACA,kCAAA;AAAA,cACA,kCAAA;AAAA,cACA,YAAA;AAAA,cACA,aAAA;AAAA,cACA,iBAAA;AAAA,cACA,QAAA;AAAA,cACA,MAAA;AAAA,cACA,QAAA;AAAA,cACA,aAAA;AAAA,cACA,IAAA;AAAA,cACA,MAAA;AAAA,cACA,gBAAA;AAAA;AAAA,cAEA;AAAA,aACF;AAAA,YACA,MAAQ,EAAA;AAAA,cACN,GAAG,YAAa,CAAA;AAAA;AAClB,WACF;AAAA,UACA,QAAU,EAAA,IAAA;AAAA;AAAA,UACV,MAAQ,EAAA,KAAA;AAAA,UACR,SAAW,EAAA;AAAA;AACb,OACF;AAAA;AACF,GACF;AACF;;;;"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { createRscStream as prodCreateRscStream } from './createRscStream.js';
|
|
2
|
+
import { createWorker as prodCreateWorker } from '../createWorker.js';
|
|
3
|
+
export declare const createRscStream: typeof prodCreateRscStream;
|
|
4
|
+
export declare const createWorker: typeof prodCreateWorker;
|
|
5
|
+
//# sourceMappingURL=production.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"production.d.ts","sourceRoot":"","sources":["../../../../plugin/worker/rsc/production.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,IAAI,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC9E,OAAO,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGtE,eAAO,MAAM,eAAe,4BAAsB,CAAC;AACnD,eAAO,MAAM,YAAY,yBAAmB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* vite-plugin-react-server
|
|
3
|
+
* Copyright (c) Nico Brinkkemper
|
|
4
|
+
* MIT License
|
|
5
|
+
*/
|
|
6
|
+
import { createRscStream as createRscStream$1 } from './createRscStream.js';
|
|
7
|
+
import { createWorker as createWorker$1 } from '../createWorker.js';
|
|
8
|
+
|
|
9
|
+
const createRscStream = createRscStream$1;
|
|
10
|
+
const createWorker = createWorker$1;
|
|
11
|
+
|
|
12
|
+
export { createRscStream, createWorker };
|
|
13
|
+
//# sourceMappingURL=production.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"production.js","sources":["../../../../plugin/worker/rsc/production.ts"],"sourcesContent":["import { createRscStream as prodCreateRscStream } from './createRscStream.js';\nimport { createWorker as prodCreateWorker } from '../createWorker.js';\n\n// Production-specific optimizations could go here\nexport const createRscStream = prodCreateRscStream;\nexport const createWorker = prodCreateWorker; "],"names":["prodCreateRscStream","prodCreateWorker"],"mappings":";;;;;;;;AAIO,MAAM,eAAkB,GAAAA;AACxB,MAAM,YAAe,GAAAC;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rsc-worker.d.ts","sourceRoot":"","sources":["../../../../plugin/worker/rsc/rsc-worker.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { createWriteStream } from "node:fs";
|
|
2
|
+
import { mkdir } from "node:fs/promises";
|
|
3
|
+
import { dirname } from "node:path";
|
|
4
|
+
import { parentPort } from "node:worker_threads";
|
|
5
|
+
import { registerClientReference, registerServerReference
|
|
6
|
+
// @ts-ignore
|
|
7
|
+
} from "react-server-dom-esm/server.node";
|
|
8
|
+
import { createRscStream } from "./createRscStream.js";
|
|
9
|
+
if (!parentPort) {
|
|
10
|
+
throw new Error("This module must be run as a worker");
|
|
11
|
+
}
|
|
12
|
+
// Track active renders
|
|
13
|
+
const activeRenders = new Map();
|
|
14
|
+
const activeStreams = new Map();
|
|
15
|
+
const activeWrites = new Map();
|
|
16
|
+
async function shutdown() {
|
|
17
|
+
console.log("[RSC Worker] Shutting down forcefully");
|
|
18
|
+
for (const stream of activeStreams.values()) {
|
|
19
|
+
stream.abort();
|
|
20
|
+
}
|
|
21
|
+
for (const writeStream of activeWrites.values()) {
|
|
22
|
+
writeStream.destroy();
|
|
23
|
+
}
|
|
24
|
+
process.exit(0);
|
|
25
|
+
}
|
|
26
|
+
function sendMessage(message) {
|
|
27
|
+
parentPort?.postMessage(message);
|
|
28
|
+
}
|
|
29
|
+
// Handle incoming messages
|
|
30
|
+
parentPort.on("message", async (message) => {
|
|
31
|
+
if (message.type === "SHUTDOWN") {
|
|
32
|
+
await shutdown();
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
try {
|
|
36
|
+
switch (message.type) {
|
|
37
|
+
case "RSC_RENDER": {
|
|
38
|
+
const { id, pageImport, propsImport, outDir, moduleRootPath, moduleBaseURL, pipableStreamOptions } = message;
|
|
39
|
+
// Skip if already rendered
|
|
40
|
+
if (activeRenders.has(id))
|
|
41
|
+
return;
|
|
42
|
+
// Create render state
|
|
43
|
+
const renderState = {
|
|
44
|
+
id,
|
|
45
|
+
outDir,
|
|
46
|
+
moduleRootPath,
|
|
47
|
+
moduleBaseURL,
|
|
48
|
+
rscOutputPath: `${outDir}/${id}.rsc`,
|
|
49
|
+
componentImport: pageImport,
|
|
50
|
+
propsImport,
|
|
51
|
+
pipableStreamOptions
|
|
52
|
+
};
|
|
53
|
+
// Ensure output directory exists
|
|
54
|
+
await mkdir(dirname(renderState.rscOutputPath), { recursive: true });
|
|
55
|
+
const writeStream = createWriteStream(renderState.rscOutputPath);
|
|
56
|
+
// Create stream
|
|
57
|
+
const stream = createRscStream(renderState, writeStream, parentPort);
|
|
58
|
+
// Track active streams
|
|
59
|
+
activeRenders.set(id, renderState);
|
|
60
|
+
activeStreams.set(id, stream);
|
|
61
|
+
activeWrites.set(id, writeStream);
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
case "RSC_END": {
|
|
65
|
+
const { id } = message;
|
|
66
|
+
activeRenders.delete(id);
|
|
67
|
+
activeStreams.delete(id);
|
|
68
|
+
activeWrites.delete(id);
|
|
69
|
+
break;
|
|
70
|
+
}
|
|
71
|
+
case "CLIENT_REFERENCE": {
|
|
72
|
+
const { id, location, key } = message;
|
|
73
|
+
const ref = registerClientReference(id, location, key);
|
|
74
|
+
sendMessage({
|
|
75
|
+
type: "CLIENT_REFERENCE",
|
|
76
|
+
id,
|
|
77
|
+
location,
|
|
78
|
+
key,
|
|
79
|
+
ref
|
|
80
|
+
});
|
|
81
|
+
break;
|
|
82
|
+
}
|
|
83
|
+
case "SERVER_REFERENCE": {
|
|
84
|
+
const { id, location, key } = message;
|
|
85
|
+
const ref = registerServerReference(id, location, key);
|
|
86
|
+
sendMessage({
|
|
87
|
+
type: "SERVER_REFERENCE",
|
|
88
|
+
id,
|
|
89
|
+
location,
|
|
90
|
+
key,
|
|
91
|
+
ref
|
|
92
|
+
});
|
|
93
|
+
break;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
catch (error) {
|
|
98
|
+
sendMessage({
|
|
99
|
+
type: "ERROR",
|
|
100
|
+
id: message.type === "RSC_RENDER" ? message.id : "",
|
|
101
|
+
error: error instanceof Error ? error.message : String(error)
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
// Signal ready
|
|
106
|
+
parentPort.postMessage({ type: "READY" });
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
interface PipeableStreamOptions {
|
|
2
|
+
bootstrapModules?: string[];
|
|
3
|
+
bootstrapScripts?: string[];
|
|
4
|
+
bootstrapScriptContent?: string;
|
|
5
|
+
signal?: AbortSignal;
|
|
6
|
+
identifierPrefix?: string;
|
|
7
|
+
namespaceURI?: string;
|
|
8
|
+
nonce?: string;
|
|
9
|
+
progressiveChunkSize?: number;
|
|
10
|
+
onShellReady?: () => void;
|
|
11
|
+
onAllReady?: () => void;
|
|
12
|
+
onError?: (error: unknown) => void;
|
|
13
|
+
importMap?: {
|
|
14
|
+
imports?: Record<string, string>;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export interface HtmlRenderState {
|
|
18
|
+
chunks: string[];
|
|
19
|
+
complete: boolean;
|
|
20
|
+
rendered: boolean;
|
|
21
|
+
outDir: string;
|
|
22
|
+
moduleRootPath: string;
|
|
23
|
+
moduleBaseURL: string;
|
|
24
|
+
htmlOutputPath: string;
|
|
25
|
+
id: string;
|
|
26
|
+
pipableStreamOptions: PipeableStreamOptions;
|
|
27
|
+
}
|
|
28
|
+
export interface RscRenderState {
|
|
29
|
+
id: string;
|
|
30
|
+
pipableStreamOptions: PipeableStreamOptions;
|
|
31
|
+
outDir: string;
|
|
32
|
+
moduleRootPath: string;
|
|
33
|
+
moduleBaseURL: string;
|
|
34
|
+
rscOutputPath: string;
|
|
35
|
+
componentImport: string;
|
|
36
|
+
propsImport: string;
|
|
37
|
+
}
|
|
38
|
+
export interface WorkerRscChunkMessage {
|
|
39
|
+
type: "RSC_CHUNK";
|
|
40
|
+
id: string;
|
|
41
|
+
chunk: string;
|
|
42
|
+
moduleRootPath: string;
|
|
43
|
+
moduleBaseURL: string;
|
|
44
|
+
outDir: string;
|
|
45
|
+
htmlOutputPath: string;
|
|
46
|
+
pipableStreamOptions: PipeableStreamOptions;
|
|
47
|
+
}
|
|
48
|
+
export interface ShutdownMessage {
|
|
49
|
+
type: "SHUTDOWN";
|
|
50
|
+
id: string;
|
|
51
|
+
}
|
|
52
|
+
export interface RscRenderMessage {
|
|
53
|
+
type: "RSC_RENDER";
|
|
54
|
+
id: string;
|
|
55
|
+
pageImport: string;
|
|
56
|
+
propsImport: string;
|
|
57
|
+
outDir: string;
|
|
58
|
+
moduleRootPath: string;
|
|
59
|
+
moduleBaseURL: string;
|
|
60
|
+
pipableStreamOptions: PipeableStreamOptions;
|
|
61
|
+
}
|
|
62
|
+
export interface RscCompleteMessage {
|
|
63
|
+
type: "RSC_COMPLETE";
|
|
64
|
+
id: string;
|
|
65
|
+
outputPath: string;
|
|
66
|
+
}
|
|
67
|
+
export interface RscErrorMessage {
|
|
68
|
+
type: "ERROR";
|
|
69
|
+
id: string;
|
|
70
|
+
error: string;
|
|
71
|
+
}
|
|
72
|
+
export interface RscWroteFileMessage {
|
|
73
|
+
type: "WROTE_FILE";
|
|
74
|
+
id: string;
|
|
75
|
+
outputPath: string;
|
|
76
|
+
}
|
|
77
|
+
export interface RscEndMessage {
|
|
78
|
+
type: "RSC_END";
|
|
79
|
+
id: string;
|
|
80
|
+
}
|
|
81
|
+
export interface ClientReferenceMessage {
|
|
82
|
+
type: "CLIENT_REFERENCE";
|
|
83
|
+
id: string;
|
|
84
|
+
location: string;
|
|
85
|
+
key: string;
|
|
86
|
+
ref: unknown;
|
|
87
|
+
}
|
|
88
|
+
export interface ServerReferenceMessage {
|
|
89
|
+
type: "SERVER_REFERENCE";
|
|
90
|
+
id: string;
|
|
91
|
+
location: string;
|
|
92
|
+
key: string;
|
|
93
|
+
ref: unknown;
|
|
94
|
+
}
|
|
95
|
+
export type HtmlWorkerMessage = WorkerRscChunkMessage | RscEndMessage | ShutdownMessage;
|
|
96
|
+
export type RscWorkerMessage = RscRenderMessage | RscEndMessage | ShutdownMessage | ClientReferenceMessage | ServerReferenceMessage;
|
|
97
|
+
export type RscWorkerResponse = RscCompleteMessage | RscErrorMessage | RscWroteFileMessage | ClientReferenceMessage | ServerReferenceMessage;
|
|
98
|
+
export {};
|
|
99
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../plugin/worker/types.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/server.d.ts
CHANGED
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export { reactServerPlugin } from './plugin/react-server/plugin.js';
|
|
2
|
+
export { reactTransformPlugin } from './plugin/transformer/plugin.js';
|
|
3
|
+
export { reactPreservePlugin } from './plugin/preserver/plugin.js';
|
|
4
|
+
export type * from './plugin/types.js';
|
|
2
5
|
//# sourceMappingURL=server.d.ts.map
|
package/dist/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAGnE,mBAAmB,mBAAmB,CAAC"}
|
package/dist/server.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* vite-plugin-react-server
|
|
3
|
+
* Copyright (c) Nico Brinkkemper
|
|
4
|
+
* MIT License
|
|
5
|
+
*/
|
|
6
|
+
export { reactServerPlugin } from './plugin/react-server/plugin.js';
|
|
7
|
+
export { reactTransformPlugin } from './plugin/transformer/plugin.js';
|
|
8
|
+
export { reactPreservePlugin } from './plugin/preserver/plugin.js';
|
|
9
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|