Tweaked the loading options a bit
This commit is contained in:
parent
9189fc20a6
commit
8bea16172d
2 changed files with 2 additions and 3 deletions
|
@ -1,6 +1,5 @@
|
||||||
import {config, critical_error, SourcePath} from "./loader";
|
import {config, critical_error, SourcePath} from "./loader";
|
||||||
import {load_parallel, LoadCallback, LoadSyntaxError, ParallelOptions, script_name} from "./utils";
|
import {load_parallel, LoadCallback, LoadSyntaxError, ParallelOptions, script_name} from "./utils";
|
||||||
import {type} from "os";
|
|
||||||
|
|
||||||
let _script_promises: {[key: string]: Promise<void>} = {};
|
let _script_promises: {[key: string]: Promise<void>} = {};
|
||||||
|
|
||||||
|
@ -34,7 +33,7 @@ function load_script_url(url: string) : Promise<void> {
|
||||||
const timeout_handle = setTimeout(() => {
|
const timeout_handle = setTimeout(() => {
|
||||||
cleanup();
|
cleanup();
|
||||||
reject("timeout");
|
reject("timeout");
|
||||||
}, 5000);
|
}, 10 * 1000);
|
||||||
script_tag.type = "application/javascript";
|
script_tag.type = "application/javascript";
|
||||||
script_tag.async = true;
|
script_tag.async = true;
|
||||||
script_tag.defer = true;
|
script_tag.defer = true;
|
||||||
|
|
|
@ -54,7 +54,7 @@ export async function loadManifestTarget(chunkName: string, taskId: number) {
|
||||||
|
|
||||||
await loader.scripts.load_multiple(manifest.chunks[chunkName].files.map(e => "js/" + e.file), {
|
await loader.scripts.load_multiple(manifest.chunks[chunkName].files.map(e => "js/" + e.file), {
|
||||||
cache_tag: undefined,
|
cache_tag: undefined,
|
||||||
max_parallel_requests: -1
|
max_parallel_requests: 4
|
||||||
}, (script, state) => {
|
}, (script, state) => {
|
||||||
if(state !== "loading")
|
if(state !== "loading")
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Reference in a new issue