refactor: improved reviving of islands (#100)

This commit is contained in:
Luca Casonato
2022-03-05 01:20:54 +01:00
committed by GitHub
parent 8daa280862
commit 4970663721
7 changed files with 110 additions and 69 deletions
+7 -2
View File
@@ -8,7 +8,12 @@ import {
} from "./deps.ts";
import { Manifest } from "./mod.ts";
import { Bundler } from "./bundle.ts";
import { ALIVE_URL, INTERNAL_PREFIX, REFRESH_JS_URL } from "./constants.ts";
import {
ALIVE_URL,
bundleAssetUrl,
INTERNAL_PREFIX,
REFRESH_JS_URL,
} from "./constants.ts";
import { JS_PREFIX } from "./constants.ts";
import { BUILD_ID } from "./constants.ts";
import {
@@ -294,7 +299,7 @@ export class ServerContext {
page: Page<Data> | UnknownPage | ErrorPage,
status: number,
) => {
const imports: string[] = [];
const imports: string[] = [bundleAssetUrl("/main.js")];
if (this.#dev) {
imports.push(REFRESH_JS_URL);
}