nitro-nightly 3.0.1-20260105-143911-656a71ed → 3.0.1-20260105-154640-72b037f6
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.
|
@@ -330,7 +330,7 @@ function createServiceEnvironment(ctx, name, serviceConfig) {
|
|
|
330
330
|
return {
|
|
331
331
|
consumer: "server",
|
|
332
332
|
build: {
|
|
333
|
-
rollupOptions: { input: serviceConfig.entry },
|
|
333
|
+
rollupOptions: { input: { index: serviceConfig.entry } },
|
|
334
334
|
minify: ctx.nitro.options.minify,
|
|
335
335
|
sourcemap: ctx.nitro.options.sourcemap,
|
|
336
336
|
outDir: join(ctx.nitro.options.buildDir, "vite/services", name),
|
|
@@ -625,7 +625,7 @@ function nitroService(ctx) {
|
|
|
625
625
|
function createContext(pluginConfig) {
|
|
626
626
|
return {
|
|
627
627
|
pluginConfig,
|
|
628
|
-
services: {},
|
|
628
|
+
services: { ...pluginConfig.experimental?.vite?.services },
|
|
629
629
|
_entryPoints: {}
|
|
630
630
|
};
|
|
631
631
|
}
|
package/dist/_presets.mjs
CHANGED
|
@@ -1600,7 +1600,7 @@ const vercel = defineNitroPreset({
|
|
|
1600
1600
|
publicDir: "{{ output.dir }}/static/{{ baseURL }}"
|
|
1601
1601
|
},
|
|
1602
1602
|
commands: {
|
|
1603
|
-
preview: "",
|
|
1603
|
+
preview: "npx srvx --static ../../static ./functions/__server.func/index.mjs",
|
|
1604
1604
|
deploy: "npx vercel deploy --prebuilt"
|
|
1605
1605
|
},
|
|
1606
1606
|
hooks: {
|
|
@@ -155,6 +155,22 @@ parentPort.on("message", (payload) => {
|
|
|
155
155
|
process.on("unhandledRejection", (error) => console.error(error));
|
|
156
156
|
process.on("uncaughtException", (error) => console.error(error));
|
|
157
157
|
|
|
158
|
+
// ----- RSC Support -----
|
|
159
|
+
|
|
160
|
+
// define __VITE_ENVIRONMENT_RUNNER_IMPORT__ for RSC support
|
|
161
|
+
// https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-rsc/README.md#__vite_environment_runner_import__
|
|
162
|
+
|
|
163
|
+
globalThis.__VITE_ENVIRONMENT_RUNNER_IMPORT__ = async function (
|
|
164
|
+
environmentName,
|
|
165
|
+
id
|
|
166
|
+
) {
|
|
167
|
+
const env = envs[environmentName];
|
|
168
|
+
if (!env) {
|
|
169
|
+
throw new Error(`Vite environment "${environmentName}" is not registered`);
|
|
170
|
+
}
|
|
171
|
+
return env.runner.import(id);
|
|
172
|
+
};
|
|
173
|
+
|
|
158
174
|
// ----- Server -----
|
|
159
175
|
|
|
160
176
|
async function reload() {
|
package/dist/vite.d.mts
CHANGED
|
@@ -34,7 +34,11 @@ interface NitroPluginConfig extends NitroConfig {
|
|
|
34
34
|
*
|
|
35
35
|
* @default true
|
|
36
36
|
*/
|
|
37
|
-
serverReload
|
|
37
|
+
serverReload?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Additional Vite environment services to register.
|
|
40
|
+
*/
|
|
41
|
+
services?: Record<string, ServiceConfig>;
|
|
38
42
|
};
|
|
39
43
|
};
|
|
40
44
|
}
|
package/package.json
CHANGED