@adonisjs/inertia 4.1.0 → 4.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/factories/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as ServerRenderer, r as Inertia } from "../inertia_manager-
|
|
1
|
+
import { n as ServerRenderer, r as Inertia } from "../inertia_manager-BGHA4cDP.js";
|
|
2
2
|
import { t as InertiaHeaders } from "../headers-DafWEpBh.js";
|
|
3
3
|
import "../debug-CBMTuPUm.js";
|
|
4
4
|
import { t as defineConfig } from "../define_config-Du2hAFGX.js";
|
package/build/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as symbols_exports, n as ServerRenderer, r as Inertia, t as InertiaManager } from "./inertia_manager-
|
|
1
|
+
import { i as symbols_exports, n as ServerRenderer, r as Inertia, t as InertiaManager } from "./inertia_manager-BGHA4cDP.js";
|
|
2
2
|
import { t as InertiaHeaders } from "./headers-DafWEpBh.js";
|
|
3
3
|
import "./debug-CBMTuPUm.js";
|
|
4
4
|
import { n as indexPages, t as defineConfig } from "./define_config-Du2hAFGX.js";
|
|
@@ -369,6 +369,7 @@ var Inertia = class {
|
|
|
369
369
|
};
|
|
370
370
|
var ServerRenderer = class {
|
|
371
371
|
#runtime;
|
|
372
|
+
#ssrEnvironment;
|
|
372
373
|
#config;
|
|
373
374
|
#vite;
|
|
374
375
|
constructor(config, vite) {
|
|
@@ -377,8 +378,15 @@ var ServerRenderer = class {
|
|
|
377
378
|
}
|
|
378
379
|
async render(pageObject) {
|
|
379
380
|
let render;
|
|
380
|
-
|
|
381
|
+
const devServer = this.#vite.getDevServer();
|
|
382
|
+
if (devServer) {
|
|
381
383
|
debug_default("creating SSR bundle using dev-server");
|
|
384
|
+
const currentSsrEnv = devServer.environments.ssr;
|
|
385
|
+
if (this.#ssrEnvironment !== currentSsrEnv) {
|
|
386
|
+
if (this.#runtime) await this.#runtime.close();
|
|
387
|
+
this.#runtime = void 0;
|
|
388
|
+
this.#ssrEnvironment = currentSsrEnv;
|
|
389
|
+
}
|
|
382
390
|
this.#runtime ??= await this.#vite.createModuleRunner();
|
|
383
391
|
this.#runtime.clearCache();
|
|
384
392
|
render = await this.#runtime.import(this.#config.ssr.entrypoint);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as InertiaManager } from "../inertia_manager-
|
|
1
|
+
import { t as InertiaManager } from "../inertia_manager-BGHA4cDP.js";
|
|
2
2
|
import { t as InertiaHeaders } from "../headers-DafWEpBh.js";
|
|
3
3
|
import { t as debug_default } from "../debug-CBMTuPUm.js";
|
|
4
4
|
const MUTATION_METHODS = [
|