module/import_scripts_chunk_loading.rsshould able to be serde_json::to_string;
_with_hmr_with_hmr_manifestwebpack/runtime/jsonp_chunk_loadingdocument.baseURI || self.location.href_with_prefetch_with_preload_with_on_chunk_load_with_callbackwebpack/runtime/load_scriptwebpack/runtime/make_namespace_objectwebpack/runtime/module_chunk_loadingcrates/rspack_plugin_runtime/src/runtime_module/module_chunk_loading.rs.url);_with_loadingwebpack/runtime/node_module_decoratorwebpack/runtime/noncewebpack/runtime/on_chunk_loadedwebpack/runtime/public_pathwebpack/runtime/readfile_chunk_loadingcrates/rspack_plugin_runtime/src/runtime_module/readfile_chunk_loading.rs__dirname + require("url").pathToFileURL(_with_external_install_chunkwebpack/runtime/relative_urlwebpack/runtime/require_chunk_loadingcrates/rspack_plugin_runtime/src/runtime_module/require_js_chunk_loading.rs_with_loading_matcherwebpack/runtime/rspack_versionwebpack/runtime/runtime_idwebpack/runtime/startup_chunk_dependencieswebpack/runtime/startup_entrypointwebpack/runtime/start_entry_pointcrates/rspack_plugin_runtime/src/runtime_module/utils.rs" + chunkId + "invalid json to_stringchunkIdcannot find last key value(chunkId === ? : chunkId)[chunkId][chunkId] || chunkId)chunkId === { }[chunkId]) return :1var currentUpdateChunks;
var currentUpdate;
var currentUpdateRemovedChunks;
var currentUpdateRuntime;
function applyHandler(options) {
if (__webpack_require__.f) delete __webpack_require__.f.$key$Hmr;
currentUpdateChunks = undefined;
function getAffectedModuleEffects(updateModuleId) {
var outdatedModules = [updateModuleId];
var outdatedDependencies = {};
var queue = outdatedModules.map(function (id) {
return {
chain: [id],
id: id
};
});
while (queue.length > 0) {
var queueItem = queue.pop();
var moduleId = queueItem.id;
var chain = queueItem.chain;
var module = __webpack_require__.c[moduleId];
if (
!module ||
(module.hot._selfAccepted && !module.hot._selfInvalidated)
) {
continue;
}
if (module.hot._selfDeclined) {
return {
type: "self-declined",
chain: chain,
moduleId: moduleId
};
}
if (module.hot._main) {
return {
type: "unaccepted",
chain: chain,
moduleId: moduleId
};
}
for (var i = 0; i < module.parents.length; i++) {
var parentId = module.parents[i];
var parent = __webpack_require__.c[parentId];
if (!parent) {
continue;
}
if (parent.hot._declinedDependencies[moduleId]) {
return {
type: "declined",
chain: chain.concat([parentId]),
moduleId: moduleId,
parentId: parentId
};
}
if (outdatedModules.indexOf(parentId) !== -1) {
continue;
}
if (parent.hot._acceptedDependencies[moduleId]) {
if (!outdatedDependencies[parentId]) {
outdatedDependencies[parentId] = [];
}
addAllToSet(outdatedDependencies[parentId], [moduleId]);
continue;
}
delete outdatedDependencies[parentId];
outdatedModules.push(parentId);
queue.push({
chain: chain.concat([parentId]),
id: parentId
});
}
}
return {
type: "accepted",
moduleId: updateModuleId,
outdatedModules: outdatedModules,
outdatedDependencies: outdatedDependencies
};
}
function addAllToSet(a, b) {
for (var i = 0; i < b.length; i++) {
var item = b[i];
if (a.indexOf(item) === -1) a.push(item);
}
}
var outdatedDependencies = {};
var outdatedModules = [];
var appliedUpdate = {};
var warnUnexpectedRequire = function warnUnexpectedRequire(module) {
console.warn(
"[HMR] unexpected require(" + module.id + ") to disposed module"
);
};
for (var moduleId in currentUpdate) {
if (__webpack_require__.o(currentUpdate, moduleId)) {
var newModuleFactory = currentUpdate[moduleId];
var result = newModuleFactory ? getAffectedModuleEffects(moduleId) : {
type: "disposed",
moduleId: moduleId
};
var abortError = false;
var doApply = false;
var doDispose = false;
var chainInfo = "";
if (result.chain) {
chainInfo = "\nUpdate propagation: " + result.chain.join(" -> ");
}
switch (result.type) {
case "self-declined":
if (options.onDeclined) options.onDeclined(result);
if (!options.ignoreDeclined)
abortError = new Error(
"Aborted because of self decline: " + result.moduleId + chainInfo
);
break;
case "declined":
if (options.onDeclined) options.onDeclined(result);
if (!options.ignoreDeclined)
abortError = new Error(
"Aborted because of declined dependency: " +
result.moduleId +
" in " +
result.parentId +
chainInfo
);
break;
case "unaccepted":
if (options.onUnaccepted) options.onUnaccepted(result);
if (!options.ignoreUnaccepted)
abortError = new Error(
"Aborted because " + moduleId + " is not accepted" + chainInfo
);
break;
case "accepted":
if (options.onAccepted) options.onAccepted(result);
doApply = true;
break;
case "disposed":
if (options.onDisposed) options.onDisposed(result);
doDispose = true;
break;
default:
throw new Error("Unexception type " + result.type);
}
if (abortError) {
return {
error: abortError
};
}
if (doApply) {
appliedUpdate[moduleId] = newModuleFactory;
addAllToSet(outdatedModules, result.outdatedModules);
for (moduleId in result.outdatedDependencies) {
if (__webpack_require__.o(result.outdatedDependencies, moduleId)) {
if (!outdatedDependencies[moduleId])
outdatedDependencies[moduleId] = [];
addAllToSet(
outdatedDependencies[moduleId],
result.outdatedDependencies[moduleId]
);
}
}
}
if (doDispose) {
addAllToSet(outdatedModules, [result.moduleId]);
appliedUpdate[moduleId] = warnUnexpectedRequire;
}
}
}
currentUpdate = undefined;
var outdatedSelfAcceptedModules = [];
for (var j = 0; j < outdatedModules.length; j++) {
var outdatedModuleId = outdatedModules[j];
var module = __webpack_require__.c[outdatedModuleId];
if (
module &&
(module.hot._selfAccepted || module.hot._main) &&
// removed self-accepted modules should not be required
appliedUpdate[outdatedModuleId] !== warnUnexpectedRequire &&
// when called invalidate self-accepting is not possible
!module.hot._selfInvalidated
) {
outdatedSelfAcceptedModules.push({
module: outdatedModuleId,
require: module.hot._requireSelf,
errorHandler: module.hot._selfAccepted
});
}
} $HOT_TEST_OUTDATED$
var moduleOutdatedDependencies;
return {
dispose: function () {
currentUpdateRemovedChunks.forEach(function (chunkId) {
delete installedChunks[chunkId];
});
currentUpdateRemovedChunks = undefined;
var idx;
var queue = outdatedModules.slice();
while (queue.length > 0) {
var moduleId = queue.pop();
var module = __webpack_require__.c[moduleId];
if (!module) continue;
var data = {};
// Call dispose handlers
var disposeHandlers = module.hot._disposeHandlers; $HOT_TEST_DISPOSE$
for (j = 0; j < disposeHandlers.length; j++) {
disposeHandlers[j].call(null, data);
}
__webpack_require__.hmrD[moduleId] = data;
module.hot.active = false;
delete __webpack_require__.c[moduleId];
delete outdatedDependencies[moduleId];
for (j = 0; j < module.children.length; j++) {
var child = __webpack_require__.c[module.children[j]];
if (!child) continue;
idx = child.parents.indexOf(moduleId);
if (idx >= 0) {
child.parents.splice(idx, 1);
}
}
}
var dependency;
for (var outdatedModuleId in outdatedDependencies) {
if (__webpack_require__.o(outdatedDependencies, outdatedModuleId)) {
module = __webpack_require__.c[outdatedModuleId];
if (module) {
moduleOutdatedDependencies = outdatedDependencies[outdatedModuleId];
for (j = 0; j < moduleOutdatedDependencies.length; j++) {
dependency = moduleOutdatedDependencies[j];
idx = module.children.indexOf(dependency);
if (idx >= 0) module.children.splice(idx, 1);
}
}
}
}
},
apply: function (reportError) {
// insert new code
for (var updateModuleId in appliedUpdate) {
if (__webpack_require__.o(appliedUpdate, updateModuleId)) {
__webpack_require__.m[updateModuleId] = appliedUpdate[updateModuleId]; $HOT_TEST_UPDATED$
}
}
// run new runtime modules
for (var i = 0; i < currentUpdateRuntime.length; i++) {
$HOT_TEST_RUNTIME$
}
// call accept handlers
for (var outdatedModuleId in outdatedDependencies) {
if (__webpack_require__.o(outdatedDependencies, outdatedModuleId)) {
var module = __webpack_require__.c[outdatedModuleId];
if (module) {
moduleOutdatedDependencies = outdatedDependencies[outdatedModuleId];
var callbacks = [];
var errorHandlers = [];
var dependenciesForCallbacks = [];
for (var j = 0; j < moduleOutdatedDependencies.length; j++) {
var dependency = moduleOutdatedDependencies[j];
var acceptCallback = module.hot._acceptedDependencies[dependency];
var errorHandler = module.hot._acceptedErrorHandlers[dependency];
if (acceptCallback) {
if (callbacks.indexOf(acceptCallback) !== -1) continue;
callbacks.push(acceptCallback);
errorHandlers.push(errorHandler); $HOT_TEST_ACCEPT$
dependenciesForCallbacks.push(dependency);
}
}
for (var k = 0; k < callbacks.length; k++) {
try {
callbacks[k].call(null, moduleOutdatedDependencies);
} catch (err) {
if (typeof errorHandlers[k] === "function") {
try {
errorHandlers[k](err, {
moduleId: outdatedModuleId,
dependencyId: dependenciesForCallbacks[k]
});
} catch (err2) {
if (options.onErrored) {
options.onErrored({
type: "accept-error-handler-errored",
moduleId: outdatedModuleId,
dependencyId: dependenciesForCallbacks[k],
error: err2,
originalError: err
});
}
if (!options.ignoreErrored) {
reportError(err2);
reportError(err);
}
}
} else {
if (options.onErrored) {
options.onErrored({
type: "accept-errored",
moduleId: outdatedModuleId,
dependencyId: dependenciesForCallbacks[k],
error: err
});
}
if (!options.ignoreErrored) {
reportError(err);
}
}
}
}
}
}
}
// Load self accepted modules
for (var o = 0; o < outdatedSelfAcceptedModules.length; o++) {
var item = outdatedSelfAcceptedModules[o];
var moduleId = item.module;
try {
item.require(moduleId);
} catch (err) {
if (typeof item.errorHandler === "function") {
try {
item.errorHandler(err, {
moduleId: moduleId,
module: __webpack_require__.c[moduleId]
});
} catch (err1) {
if (options.onErrored) {
options.onErrored({
type: "self-accept-error-handler-errored",
moduleId: moduleId,
error: err1,
originalError: err
});
}
if (!options.ignoreErrored) {
reportError(err1);
reportError(err);
}
}
} else {
if (options.onErrored) {
options.onErrored({
type: "self-accept-errored",
moduleId: moduleId,
error: err
});
}
if (!options.ignoreErrored) {
reportError(err);
}
}
}
}
return outdatedModules;
}
};
}
__webpack_require__.hmrI.$key$ = function (moduleId, applyHandlers) {
if (!currentUpdate) {
currentUpdate = {};
currentUpdateRuntime = [];
currentUpdateRemovedChunks = [];
applyHandlers.push(applyHandler);
}
if (!__webpack_require__.o(currentUpdate, moduleId)) {
currentUpdate[moduleId] = __webpack_require__.m[moduleId];
}
};
__webpack_require__.hmrC.$key$ = function (
chunkIds,
removedChunks,
removedModules,
promises,
applyHandlers,
updatedModulesList
) {
applyHandlers.push(applyHandler);
currentUpdateChunks = {};
currentUpdateRemovedChunks = removedChunks;
currentUpdate = removedModules.reduce(function (obj, key) {
obj[key] = false;
return obj;
}, {});
currentUpdateRuntime = [];
chunkIds.forEach(function (chunkId) {
if (
__webpack_require__.o(installedChunks, chunkId) &&
installedChunks[chunkId] !== undefined
) {
promises.push(loadUpdateChunk(chunkId, updatedModulesList));
currentUpdateChunks[chunkId] = true;
} else {
currentUpdateChunks[chunkId] = false;
}
});
if (__webpack_require__.f) {
__webpack_require__.f.$key$Hmr = function (chunkId, promises) {
if (
currentUpdateChunks &&
__webpack_require__.o(currentUpdateChunks, chunkId) &&
!currentUpdateChunks[chunkId]
) {
promises.push(loadUpdateChunk(chunkId));
currentUpdateChunks[chunkId] = true;
}
};
}
};
$key$$HOT_TEST_OUTDATED$$HOT_TEST_DISPOSE$$HOT_TEST_UPDATED$$HOT_TEST_RUNTIME$$HOT_TEST_ACCEPT$crates/rspack_plugin_runtime/src/lib.rscrates/rspack_plugin_runtime/src/common_js_chunk_format.rsCommonJsChunkFormatPlugin:compilationrspack_plugin_runtime::common_js_chunk_formatCommonJsChunkFormatPlugin:additional_chunk_runtime_requirementsCommonJsChunkFormatPlugin:js_chunk_hashCommonJsChunkFormatPlugin:compilation_dependent_full_hashexports.ids = [];
exports.modules = exports.runtime = // load runtime
var = require((exports)
should have last entry module(function() {
})()CommonJsChunkFormatPlugin:render_chunkRuntimePlugin:compilationrspack_plugin_runtime::runtime_pluginRuntimePlugin:js_chunk_hashjavascriptcssupdate manifestpreloadRuntimePlugin:runtime_requirements_in_treecrates/rspack_plugin_runtime/src/array_push_callback_chunk_format.rsArrayPushCallbackChunkFormatPlugin:compilationrspack_plugin_runtime::array_push_callback_chunk_formatArrayPushCallbackChunkFormatPlugin:additional_chunk_runtime_requirementsArrayPushCallbackChunkFormatPlugin:js_chunk_hash](json stringify failed[""] = "] || []).push([[], return __webpack_exports__;
])ArrayPushCallbackChunkFormatPlugin:render_chunkCommonJsChunkLoadingPluginInnerasync_chunk_loadingcrates/rspack_plugin_runtime/src/common_js_chunk_loading.rsCommonJsChunkLoadingPlugin:runtime_requirements_in_treerspack_plugin_runtime::common_js_chunk_loadingJsonpChunkLoadingPluginInnercrates/rspack_plugin_runtime/src/jsonp_chunk_loading.rsJsonpChunkLoadingPlugin:runtime_requirements_in_treerspack_plugin_runtime::jsonp_chunk_loadingcrates/rspack_plugin_runtime/src/module_chunk_format.rsModuleChunkFormatPlugin:compilationrspack_plugin_runtime::module_chunk_formatModuleChunkFormatPlugin:additional_chunk_runtime_requirementsrspack.ModuleChunkFormatPluginModuleChunkFormatPlugin:js_chunk_hashModuleChunkFormatPlugin:compilation_dependent_full_hashinternal error: entered unreachable code: HMR is not implemented for module chunk format yetexport const __webpack_modules__ = export const __webpack_runtime__ = import __webpack_require__ from '';
= moduleId); }import * as __webpack_chunk_$__ from '';(__webpack_chunk_$);ModuleChunkFormatPlugin:render_chunkModuleChunkLoadingPluginInnercrates/rspack_plugin_runtime/src/module_chunk_loading.rsModuleChunkLoadingPlugin:runtime_requirements_in_treerspack_plugin_runtime::module_chunk_loadingImportScriptsChunkLoadingPluginInnercrates/rspack_plugin_runtime/src/import_scripts_chunk_loading.rsImportScriptsChunkLoadingPlugin:runtime_requirements_in_treerspack_plugin_runtime::import_scripts_chunk_loadingcrates/rspack_plugin_runtime/src/runtime_module/amd_define.rsAmdDefineRuntimeModuleArchivedAmdDefineRuntimeModule = function () { throw new Error('define cannot be used indirect'); }crates/rspack_plugin_runtime/src/runtime_module/amd_options.rsAmdOptionsRuntimeModuleArchivedAmdOptionsRuntimeModulecrates/rspack_plugin_runtime/src/runtime_module/async_module.rsAsyncRuntimeModuleArchivedAsyncRuntimeModulevar webpackQueues =
typeof Symbol === "function"
? Symbol("webpack queues")
: "__webpack_queues__";
var webpackExports =
typeof Symbol === "function"
? Symbol("webpack exports")
: "<%- EXPORTS %>";
var webpackError =
typeof Symbol === "function" ? Symbol("webpack error") : "__webpack_error__";
var resolveQueue = <%- basicFunction("queue") %> {
if (queue && queue.d < 1) {
queue.d = 1;
queue.forEach(<%- expressionFunction("fn.r--", "fn") %>);
queue.forEach(<%- expressionFunction("fn.r-- ? fn.r++ : fn()", "fn") %>);
}
}
var wrapDeps = <%- basicFunction("deps") %> {
return deps.map(<%- basicFunction("dep") %> {
if (dep !== null && typeof dep === "object") {
if (dep[webpackQueues]) return dep;
if (dep.then) {
var queue = [];
queue.d = 0;
dep.then(<%- basicFunction("r") %> {
obj[webpackExports] = r;
resolveQueue(queue);
},<%- basicFunction("e") %> {
obj[webpackError] = e;
resolveQueue(queue);
});
var obj = {};
obj[webpackQueues] = <%- expressionFunction("fn(queue)", "fn") %>;
return obj;
}
}
var ret = {};
ret[webpackQueues] = <%- emptyFunction() %>;
ret[webpackExports] = dep;
return ret;
});
};
<%- ASYNC_MODULE %> = <%- basicFunction("module, body, hasAwait") %> {
var queue;
hasAwait && ((queue = []).d = -1);
var depQueues = new Set();
var exports = module.exports;
var currentDeps;
var outerResolve;
var reject;
var promise = new Promise(<%- basicFunction("resolve, rej") %> {
reject = rej;
outerResolve = resolve;
});
promise[webpackExports] = exports;
promise[webpackQueues] = <%- basicFunction("fn") %> { queue && fn(queue), depQueues.forEach(fn), promise["catch"](<%- emptyFunction() %>); };
module.exports = promise;
body(<%- basicFunction("deps") %> {
currentDeps = wrapDeps(deps);
var fn;
var getResult = <%- basicFunction("") %> {
return currentDeps.map(<%- basicFunction("d") %> {
if (d[webpackError]) throw d[webpackError];
return d[webpackExports];
});
}
var promise = new Promise(<%- basicFunction("resolve") %> {
fn = <%- expressionFunction("resolve(getResult)", "") %>;
fn.r = 0;
var fnQueue = <%- expressionFunction("q !== queue && !depQueues.has(q) && (depQueues.add(q), q && !q.d && (fn.r++, q.push(fn)))", "q") %>;
currentDeps.map(<%- expressionFunction("dep[webpackQueues](fnQueue)", "dep") %>);
});
return fn.r ? promise : getResult();
}, <%- expressionFunction("(err ? reject(promise[webpackError] = err) : outerResolve(exports)), resolveQueue(queue)", "err") %>);
queue && queue.d < 0 && (queue.d = 0);
};AutoPublicPathRuntimeModuleArchivedAutoPublicPathRuntimeModulevar scriptUrl;
<% if (script_type == "module") { %>
if (typeof <%- import_meta_name %>.url === "string") scriptUrl = <%- import_meta_name %>.url
<% } else { %>
if (<%- GLOBAL %>.importScripts) scriptUrl = <%- GLOBAL %>.location + "";
var document = <%- GLOBAL %>.document;
if (!scriptUrl && document) {
// Technically we could use `document.currentScript instanceof window.HTMLScriptElement`,
// but an attacker could try to inject ``
// and use `
`
if (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT') scriptUrl = document.currentScript.src;
if (!scriptUrl) {
var scripts = document.getElementsByTagName("script");
if (scripts.length) {
var i = scripts.length - 1;
while (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;
}
}
}
<% } %>
// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration",
// or pass an empty string ("") and set the __webpack_public_path__ variable from your code to use your own logic.',
if (!scriptUrl) throw new Error("Automatic publicPath is not supported in this browser");
scriptUrl = scriptUrl.replace(/^blob:/, "").replace(/#.*$/, "").replace(/\?.*$/, "").replace(/\/[^\/]+$/, "/");
<%- assign %>The chunk should be attachedcrates/rspack_plugin_runtime/src/runtime_module/base_uri.rsBaseUriRuntimeModuleArchivedBaseUriRuntimeModulecrates/rspack_plugin_runtime/src/runtime_module/chunk_name.rsChunkNameRuntimeModuleArchivedChunkNameRuntimeModuleInvalid json stringinternal error: entered unreachable code: should attach chunk for css_loadingcrates/rspack_plugin_runtime/src/runtime_module/chunk_prefetch_preload_function.rsChunkPrefetchPreloadFunctionRuntimeModuleArchivedChunkPrefetchPreloadFunctionRuntimeModule<%- RUNTIME_HANDLERS %> = {};
<%- RUNTIME_FUNCTION %> = <%- basicFunction("chunkId") %> {
Object.keys(<%- RUNTIME_HANDLERS %>).map(<%- basicFunction("key") %> {
<%- RUNTIME_HANDLERS %>[key](chunkId);
});
}crates/rspack_plugin_runtime/src/runtime_module/chunk_prefetch_startup.rsChunkPrefetchStartupRuntimeModuleArchivedChunkPrefetchStartupRuntimeModulestartup_chunks<%- ON_CHUNKS_LOADED %>(0, <%- GROUP_CHUNK_IDS %>, <%- basicFunction("") %> {
<%- BODY %>
}, 5);chunk do not attachedinvalid json tostring.map(crates/rspack_plugin_runtime/src/runtime_module/chunk_prefetch_trigger.rsChunkPrefetchTriggerRuntimeModuleArchivedChunkPrefetchTriggerRuntimeModulechunk_mapvar chunkToChildrenMap = <%- CHUNK_MAP %>;
<%- ENSURE_CHUNK_HANDLERS %>.prefetch = <%- basicFunction("chunkId, promises") %> {
Promise.all(promises).then(<%- basicFunction("") %> {
var chunks = chunkToChildrenMap[chunkId];
Array.isArray(chunks) && chunks.map(<%- PREFETCH_CHUNK %>);
});
};crates/rspack_plugin_runtime/src/runtime_module/chunk_preload_trigger.rsArchivedChunkPreloadTriggerRuntimeModulevar chunkToChildrenMap = <%- CHUNK_MAP %>;
<%- ENSURE_CHUNK_HANDLERS %>.preload = <%- basicFunction("chunkId") %> {
var chunks = chunkToChildrenMap[chunkId];
Array.isArray(chunks) && chunks.map(<%- PRELOAD_CHUNK %>);
};crates/rspack_plugin_runtime/src/runtime_module/compat_get_default_export.rsCompatGetDefaultExportRuntimeModuleArchivedCompatGetDefaultExportRuntimeModule// getDefaultExport function for compatibility with non-ESM modules
<%- COMPAT_GET_DEFAULT_EXPORT %> = <%- basicFunction("module") %> {
var getter = module && module.__esModule ?
<%- returningFunction("module['default']", "") %> :
<%- returningFunction("module", "") %>;
<%- DEFINE_PROPERTY_GETTERS %>(getter, { a: getter });
return getter;
};
crates/rspack_plugin_runtime/src/runtime_module/create_fake_namespace_object.rsCreateFakeNamespaceObjectRuntimeModuleArchivedCreateFakeNamespaceObjectRuntimeModulevar getProto = Object.getPrototypeOf ? <%- returningFunction("Object.getPrototypeOf(obj)", "obj") %> : <%- returningFunction("obj.__proto__", "obj") %>;
var leafPrototypes;
// create a fake namespace object
// mode & 1: value is a module id, require it
// mode & 2: merge all properties of value into the ns
// mode & 4: return value when already ns object
// mode & 16: return value when it's Promise-like
// mode & 8|1: behave like require
<%- CREATE_FAKE_NAMESPACE_OBJECT %> = function(value, mode) {
if(mode & 1) value = this(value);
if(mode & 8) return value;
if(typeof value === 'object' && value) {
if((mode & 4) && value.__esModule) return value;
if((mode & 16) && typeof value.then === 'function') return value;
}
var ns = Object.create(null);
<%- MAKE_NAMESPACE_OBJECT %>(ns);
var def = {};
leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];
for(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {
Object.getOwnPropertyNames(current).forEach(<%- basicFunction("key") %> { def[key] = <%- returningFunction("value[key]", "") %> });
}
def['default'] = <%- returningFunction("value", "") %>;
<%- DEFINE_PROPERTY_GETTERS %>(ns, def);
return ns;
};crates/rspack_plugin_runtime/src/runtime_module/create_script.rsCreateScriptRuntimeModuleArchivedCreateScriptRuntimeModule<%- CREATE_SCRIPT %> = <%- returningFunction(_return, "script") %>().createScript(script)crates/rspack_plugin_runtime/src/runtime_module/create_script_url.rsCreateScriptUrlRuntimeModuleArchivedCreateScriptUrlRuntimeModule<%- CREATE_SCRIPT_URL %> = <%- returningFunction(_return, "url") %>().createScriptURL(url)crates/rspack_plugin_runtime/src/runtime_module/define_property_getters.rsDefinePropertyGettersRuntimeModuleArchivedDefinePropertyGettersRuntimeModule<%- DEFINE_PROPERTY_GETTERS %> = <%- basicFunction("exports, definition") %> {
for(var key in definition) {
if(<%- HAS_OWN_PROPERTY %>(definition, key) && !<%- HAS_OWN_PROPERTY %>(exports, key)) {
Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
}
}
};crates/rspack_plugin_runtime/src/runtime_module/ensure_chunk.rsEnsureChunkRuntimeModule<%- ENSURE_CHUNK_HANDLERS %> = {};
// This file contains only the entry chunk.
// The chunk loading function for additional chunks
<%- ENSURE_CHUNK %> = <%- basicFunction(_args) %> {
return Promise.all(
Object.keys(<%- ENSURE_CHUNK_HANDLERS %>).reduce(<%- basicFunction("promises, key") %> {
<%- ENSURE_CHUNK_HANDLERS %>[key](chunkId, promises<%- _fetch_priority %>);
return promises;
}, [])
);
};// The chunk loading function for additional chunks
// Since all referenced chunks are already included
// in this file, this function is empty here.
<%- ENSURE_CHUNK %> = <%- returningFunction("Promise.resolve()", "") %> should have chunk, fetchPrioritycrates/rspack_plugin_runtime/src/runtime_module/esm_module_decorator.rsESMModuleDecoratorRuntimeModuleArchivedESMModuleDecoratorRuntimeModule<%- ESM_MODULE_DECORATOR %> = <%- basicFunction("module") %> {
module = Object.create(module);
if (!module.children) module.children = [];
Object.defineProperty(module, 'exports', {
enumerable: true,
set: <%- basicFunction("") %> {
throw new Error('ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: ' + module.id);
}
});
return module;
};crates/rspack_plugin_runtime/src/runtime_module/export_webpack_require.rsExportWebpackRequireRuntimeModuleArchivedExportWebpackRequireRuntimeModuleexport default crates/rspack_plugin_runtime/src/runtime_module/get_chunk_filename.rsArchivedGetChunkFilenameRuntimeModule// This function allow to reference chunks
<%- _global %> = <%- basicFunction("chunkId") %> {
// return url for filenames not based on template
<%- _static_urls %>
// return url for filenames based on template
return <%- _dynamic_url %>
}[fullhash]() + "().slice(0, [chunkhash]"" + chunkId + ".crates/rspack_plugin_runtime/src/runtime_module/get_chunk_update_filename.rsGetChunkUpdateFilenameRuntimeModuleArchivedGetChunkUpdateFilenameRuntimeModule<%- GET_CHUNK_UPDATE_SCRIPT_FILENAME %> = <%- returningFunction(_filename, "chunkId") %>() + '' + chunkId + 'internal error: entered unreachable code: should attach chunk for get_main_filenamecrates/rspack_plugin_runtime/src/runtime_module/get_full_hash.rsGetFullHashRuntimeModule<%- GET_FULL_HASH %> = <%- returningFunction(_hash, "") %>crates/rspack_plugin_runtime/src/runtime_module/get_main_filename.rsGetMainFilenameRuntimeModuleArchivedGetMainFilenameRuntimeModule = function () {
return "";
};
crates/rspack_plugin_runtime/src/runtime_module/get_trusted_types_policy.rsGetTrustedTypesPolicyRuntimeModuleArchivedGetTrustedTypesPolicyRuntimeModulevar policy;
<%- GET_TRUSTED_TYPES_POLICY %> = <%- basicFunction("") %> {
// Create Trusted Type policy if Trusted Types are available and the policy doesn't exist yet.
if (policy === undefined) {
policy = {
<%- _policy_content %>
};
if (typeof trustedTypes !== "undefined" && trustedTypes.createPolicy) {
<%- _wrap_policy_creation_try_catch_start %>
policy = trustedTypes.createPolicy("<%- _policy_name %>", policy);
<%- _warp_policy_creation_try_catch_end %>
}
}
return policy;
}should have trusted_types
createScript: function (script) {
return script;
}
createScriptURL: function (url) {
return url;
}
try {
} catch (e) {
console.warn('Could not create trusted-types policy ');
}
_wrap_policy_creation_try_catch_start_warp_policy_creation_try_catch_endcrates/rspack_plugin_runtime/src/runtime_module/global.rsGlobalRuntimeModuleArchivedGlobalRuntimeModule<%- GLOBAL %> = (<%- basicFunction("") %> {
if (typeof globalThis === 'object') return globalThis;
try {
return this || new Function('return this')();
} catch (e) {
if (typeof window === 'object') return window;
}
})();crates/rspack_plugin_runtime/src/runtime_module/has_own_property.rsHasOwnPropertyRuntimeModuleArchivedHasOwnPropertyRuntimeModule<%- HAS_OWN_PROPERTY %> = <%- returningFunction("Object.prototype.hasOwnProperty.call(obj, prop)", "obj, prop") %>ImportScriptsChunkLoadingRuntimeModuleArchivedImportScriptsChunkLoadingRuntimeModulewith_create_script_url// importScripts chunk loading
var installChunk = <%- basicFunction("data") %> {
<%- destructureArray("chunkIds, moreModules, runtime", "data") %>
for (var moduleId in moreModules) {
if (<%- HAS_OWN_PROPERTY %>(moreModules, moduleId)) {
<%- MODULE_FACTORIES %>[moduleId] = moreModules[moduleId];
}
}
if (runtime) runtime(<%- REQUIRE %>);
while (chunkIds.length) installedChunks[chunkIds.pop()] = 1;
parentChunkLoadingFunction(data);
};
<%- ENSURE_CHUNK_HANDLERS %>.i = <%- basicFunction("chunkId, promises") %> {
<%- _body %>
};
var chunkLoadingGlobal = <%- _chunk_loading_global_expr %> = <%- _chunk_loading_global_expr %> || [];
var parentChunkLoadingFunction = chunkLoadingGlobal.push.bind(chunkLoadingGlobal);
chunkLoadingGlobal.push = installChunk;function loadUpdateChunk(chunkId, updatedModulesList) {
var success = false;
<%- _global_object %>[<%- _hot_update_global %>] = <%- basicFunction("_, moreModules, runtime") %> {
for (var moduleId in moreModules) {
if (<%- HAS_OWN_PROPERTY %>(moreModules, moduleId)) {
currentUpdate[moduleId] = moreModules[moduleId];
if (updatedModulesList) updatedModulesList.push(moduleId);
}
}
if (runtime) currentUpdateRuntime.push(runtime);
success = true;
};
// start update chunk loading
importScripts(<%- _url %>);
if (!success) throw new Error("Loading update chunk failed for unknown reason");
}<%- HMR_DOWNLOAD_MANIFEST %> = <%- basicFunction("") %> {
if (typeof fetch === "undefined") throw new Error("No browser support: need fetch API");
return fetch(<%- PUBLIC_PATH %> + <%- GET_UPDATE_MANIFEST_FILENAME %>()).then(
<%- basicFunction("response") %> {
if (response.status === 404) return; // no update available
if (!response.ok)
throw new Error(
"Failed to fetch update manifest " + response.statusText
);
return response.json();
}
);
};The chunk should be attached.var installedChunks = _importScripts"](chunkId)(chunkId))
// "1" is the signal for "already loaded
if (!installedChunks[chunkId]) {
if ();
}
}
installedChunks[chunkId] = 1;_chunk_loading_global_expr_hot_update_globalfailed to serde_json::to_string(hot_update_global)importScriptscrates/rspack_plugin_runtime/src/runtime_module/jsonp_chunk_loading.rsJsonpChunkLoadingRuntimeModuleArchivedJsonpChunkLoadingRuntimeModule// JSONP chunk loading for javascript
var installedChunkData = <%- HAS_OWN_PROPERTY %>(installedChunks, chunkId)
? installedChunks[chunkId]
: undefined;
if (installedChunkData !== 0) {
// 0 means "already installed".
// a Promise means "currently loading".
if (installedChunkData) {
promises.push(installedChunkData[2]);
} else {
if (<%- _js_matcher %>) {
// setup Promise in chunk cache
var promise = new Promise(<%- expressionFunction("installedChunkData = installedChunks[chunkId] = [resolve, reject]", "resolve, reject") %>);
promises.push((installedChunkData[2] = promise));
// start chunk loading
var url = <%- PUBLIC_PATH %> + <%- GET_CHUNK_SCRIPT_FILENAME %>(chunkId);
// create error before stack unwound to get useful stacktrace later
var error = new Error();
var loadingEnded = function (event) {
if (<%- HAS_OWN_PROPERTY %>(installedChunks, chunkId)) {
installedChunkData = installedChunks[chunkId];
if (installedChunkData !== 0) installedChunks[chunkId] = undefined;
if (installedChunkData) {
var errorType =
event && (event.type === 'load' ? 'missing' : event.type);
var realSrc = event && event.target && event.target.src;
error.message =
'Loading chunk ' +
chunkId +
' failed.\n(' +
errorType +
': ' +
realSrc +
')';
error.name = 'ChunkLoadError';
error.type = errorType;
error.request = realSrc;
installedChunkData[1](error);
}
}
};
__webpack_require__.l(url, loadingEnded, "chunk-" + chunkId, chunkId<%- _fetch_priority %>);
} <%- _match_fallback %>
}
}
<%- PREFETCH_CHUNK_HANDLERS %>.j = <%- basicFunction("chunkId") %> {
if ((!<%- HAS_OWN_PROPERTY %>(installedChunks, chunkId) || installedChunks[chunkId] === undefined) && <%- _js_matcher %>) {
installedChunks[chunkId] = null;
<%- _link_prefetch %>
document.head.appendChild(link);
}
};
<%- PRELOAD_CHUNK_HANDLERS %>.j = <%- basicFunction("chunkId") %> {
if ((!<%- HAS_OWN_PROPERTY %>(installedChunks, chunkId) || installedChunks[chunkId] === undefined) && <%- _js_matcher %>) {
installedChunks[chunkId] = null;
<%- _link_preload %>
document.head.appendChild(link);
}
};
var currentUpdatedModulesList;
var waitingUpdateResolves = {};
function loadUpdateChunk(chunkId, updatedModulesList) {
currentUpdatedModulesList = updatedModulesList;
return new Promise(<%- basicFunction("resolve, reject") %> {
waitingUpdateResolves[chunkId] = resolve;
// start update chunk loading
var url = <%- PUBLIC_PATH %> + <%- GET_CHUNK_UPDATE_SCRIPT_FILENAME %>(chunkId);
// create error before stack unwound to get useful stacktrace later
var error = new Error();
var loadingEnded = <%- basicFunction("event") %> {
if (waitingUpdateResolves[chunkId]) {
waitingUpdateResolves[chunkId] = undefined;
var errorType =
event && (event.type === 'load' ? 'missing' : event.type);
var realSrc = event && event.target && event.target.src;
error.message =
'Loading hot update chunk ' +
chunkId +
' failed.\n(' +
errorType +
': ' +
realSrc +
')';
error.name = 'ChunkLoadError';
error.type = errorType;
error.request = realSrc;
reject(error);
}
};
<%- LOAD_SCRIPT %>(url, loadingEnded);
});
}
<%- _global_object %>[<%- _hot_update_global %>] = <%- basicFunction("chunkId, moreModules, runtime") %> {
for (var moduleId in moreModules) {
if (<%- HAS_OWN_PROPERTY %>(moreModules, moduleId)) {
currentUpdate[moduleId] = moreModules[moduleId];
if (currentUpdatedModulesList) currentUpdatedModulesList.push(moduleId);
}
}
if (runtime) currentUpdateRuntime.push(runtime);
if (waitingUpdateResolves[chunkId]) {
waitingUpdateResolves[chunkId]();
waitingUpdateResolves[chunkId] = undefined;
}
};
<%- HMR_DOWNLOAD_MANIFEST %> = <%- basicFunction("") %> {
if (typeof fetch === "undefined")
throw new Error("No browser support: need fetch API");
return fetch(<%- PUBLIC_PATH %> + <%- GET_UPDATE_MANIFEST_FILENAME %>()).then(
<%- basicFunction("response") %> {
if (response.status === 404) return; // no update available
if (!response.ok)
throw new Error(
"Failed to fetch update manifest " + response.statusText
);
return response.json();
}
);
};
<%- ON_CHUNKS_LOADED %>.j = <%- returningFunction("installedChunks[chunkId] === 0", "chunkId") %>;
// install a JSONP callback for chunk loading
var webpackJsonpCallback = <%- basicFunction("parentChunkLoadingFunction, data") %> {
<%- destructureArray("chunkIds, moreModules, runtime", "data") %>
// add "moreModules" to the modules object,
// then flag all "chunkIds" as loaded and fire callback
var moduleId, chunkId, i = 0;
if (chunkIds.some(<%- returningFunction("installedChunks[id] !== 0", "id") %>)) {
for (moduleId in moreModules) {
if (<%- HAS_OWN_PROPERTY %>(moreModules, moduleId)) {
<%- MODULE_FACTORIES %>[moduleId] = moreModules[moduleId];
}
}
if (runtime) var result = runtime(<%- REQUIRE %>);
}
if (parentChunkLoadingFunction) parentChunkLoadingFunction(data);
for (; i < chunkIds.length; i++) {
chunkId = chunkIds[i];
if (
<%- HAS_OWN_PROPERTY %>(installedChunks, chunkId) &&
installedChunks[chunkId]
) {
installedChunks[chunkId][0]();
}
installedChunks[chunkId] = 0;
}
<%- _with_on_chunk_load %>
};
var chunkLoadingGlobal = <%- _chunk_loading_global_expr %> = <%- _chunk_loading_global_expr %> || [];
chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
_jsonp
// object to store loaded and loading chunks
// undefined = chunk not loaded, null = chunk preloaded/prefetched
// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
var installedChunks = else installedChunks[chunkId] = 0;
installedChunks[chunkId] = 0;) {
}
link.crossOrigin = link.charset = 'utf-8';
var link = document.createElement('link');
$LINK_CHART_CHARSET$
$CROSS_ORIGIN$
if (__webpack_require__.nc) {
link.setAttribute("nonce", __webpack_require__.nc);
}
link.rel = "prefetch";
link.as = "script";
link.href = __webpack_require__.p + __webpack_require__.u(chunkId);
$LINK_CHART_CHARSET$$CROSS_ORIGIN$
if (link.href.indexOf(window.location.origin + '/') !== 0) {
link.crossOrigin =
}
link.crossOrigin = "use-credentials";link.type =
link.rel = "preload";
link.as = "script";
link.rel = "modulepreload";
var link = document.createElement('link');
$LINK_CHART_CHARSET$
$SCRIPT_TYPE_LINK_PRE$
if (__webpack_require__.nc) {
link.setAttribute("nonce", __webpack_require__.nc);
}
$SCRIPT_TYPE_LINK_POST$
link.href = __webpack_require__.p + __webpack_require__.u(chunkId);
$CROSS_ORIGIN$
$SCRIPT_TYPE_LINK_PRE$$SCRIPT_TYPE_LINK_POST$jsonpreturn (result);crates/rspack_plugin_runtime/src/runtime_module/load_script.rsLoadScriptRuntimeModuleArchivedLoadScriptRuntimeModulechunk_ukeyunique_name(url)
if (script.src.indexOf(window.location.origin + '/') !== 0) {
script.crossOrigin = "";
}
script.crossOrigin = "use-credentials";script.type = 'failed to serialize unique prefixvar dataWebpackPrefix = script.charset = 'utf-8';
script = document.createElement('script');
$SCRIPT_TYPE$
$SCRIPT_CHARSET$
script.timeout = $CHUNK_LOAD_TIMEOUT_IN_SECONDS$;
if (__webpack_require__.nc) {
script.setAttribute("nonce", __webpack_require__.nc);
}
$UNIQUE_SET_ATTRIBUTE$
$FETCH_PRIORITY_SET_ATTRIBUTE$
script.src = $URL$;
$CROSS_ORIGIN_LOADING$
$SCRIPT_TYPE$$CHUNK_LOAD_TIMEOUT_IN_SECONDS$script.setAttribute("data-webpack", dataWebpackPrefix + key);$UNIQUE_SET_ATTRIBUTE$
if(fetchPriority) {
script.setAttribute("fetchpriority", fetchPriority);
}
$FETCH_PRIORITY_SET_ATTRIBUTE$$URL$$CROSS_ORIGIN_LOADING$var inProgress = {};
$UNIQUE_PREFIX$
// loadScript function to load a script via script tag
__webpack_require__.l = function (url, done, key, chunkId$FETCH_PRIORITY$) {
if (inProgress[url]) {
inProgress[url].push(done);
return;
}
var script, needAttach;
if (key !== undefined) {
var scripts = document.getElementsByTagName("script");
for (var i = 0; i < scripts.length; i++) {
var s = scripts[i];
if ($UNIQUE_GET_ATTRIBUTE$) {
script = s;
break;
}
}
}
if (!script) {
needAttach = true;
$CREATE_SCRIPT$
}
inProgress[url] = [done];
var onScriptComplete = function (prev, event) {
script.onerror = script.onload = null;
clearTimeout(timeout);
var doneFns = inProgress[url];
delete inProgress[url];
script.parentNode && script.parentNode.removeChild(script);
doneFns &&
doneFns.forEach(function (fn) {
return fn(event);
});
if (prev) return prev(event);
};
var timeout = setTimeout(
onScriptComplete.bind(null, undefined, {
type: 'timeout',
target: script
}),
$CHUNK_LOAD_TIMEOUT$
);
script.onerror = onScriptComplete.bind(null, script.onerror);
script.onload = onScriptComplete.bind(null, script.onload);
needAttach && document.head.appendChild(script);
};
$CREATE_SCRIPT$$CHUNK_LOAD_TIMEOUT$s.getAttribute("src") == urls.getAttribute("src") == url || s.getAttribute("data-webpack") == dataWebpackPrefix + key$UNIQUE_GET_ATTRIBUTE$$UNIQUE_PREFIX$crates/rspack_plugin_runtime/src/runtime_module/make_namespace_object.rsArchivedMakeNamespaceObjectRuntimeModule// define __esModule on exports
<%- MAKE_NAMESPACE_OBJECT %> = <%- basicFunction("exports") %> {
if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
}
Object.defineProperty(exports, '__esModule', { value: true });
};ModuleChunkLoadingRuntimeModuleArchivedModuleChunkLoadingRuntimeModulevar installChunk = <%- basicFunction("data") %> {
var __webpack_ids__ = data.__webpack_ids__;
var __webpack_modules__ = data.__webpack_modules__;
var __webpack_runtime__ = data.__webpack_runtime__;
// add "modules" to the modules object,
// then flag all "ids" as loaded and fire callback
var moduleId, chunkId, i = 0;
for (moduleId in __webpack_modules__) {
if (<%- HAS_OWN_PROPERTY %>(__webpack_modules__, moduleId)) {
<%- MODULE_FACTORIES %>[moduleId] = __webpack_modules__[moduleId];
}
}
if (__webpack_runtime__) __webpack_runtime__(<%- REQUIRE %>);
for (; i < __webpack_ids__.length; i++) {
chunkId = __webpack_ids__[i];
if (<%- HAS_OWN_PROPERTY %>(installedChunks, chunkId) && installedChunks[chunkId]) {
installedChunks[chunkId][0]();
}
installedChunks[__webpack_ids__[i]] = 0;
}
<%- _with_on_chunk_load %>
};// import() chunk loading for javascript
var installedChunkData = <%- HAS_OWN_PROPERTY %>(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;
if (installedChunkData !== 0) { // 0 means "already installed".'
// a Promise means "currently loading".
if (installedChunkData) {
promises.push(installedChunkData[1]);
} else {
if (<%- _js_matcher %>) {
// setup Promise in chunk cache
var promise = <%- _import_function_name %>("<%- _output_dir %>" + <%- GET_CHUNK_SCRIPT_FILENAME %>(chunkId)).then(installChunk, <%- basicFunction("e") %> {
if (installedChunks[chunkId] !== 0) installedChunks[chunkId] = undefined;
throw e;
});
var promise = Promise.race([promise, new Promise(<%- basicFunction("resolve") %> {
installedChunkData = installedChunks[chunkId] = [resolve];
})]);
promises.push(installedChunkData[1] = promise);
}
<%- _match_fallback %>
}
}_module();_import_function_name.j = function (chunkId, promises) {
= installChunk;
.j = function(chunkId) {
return installedChunks[chunkId] === 0;
}
crates/rspack_plugin_runtime/src/runtime_module/node_module_decorator.rsArchivedNodeModuleDecoratorRuntimeModule<%- NODE_MODULE_DECORATOR %> = <%- basicFunction("module") %> {
module.paths = [];
if (!module.children) module.children = [];
return module;
};crates/rspack_plugin_runtime/src/runtime_module/nonce.rsNonceRuntimeModuleArchivedNonceRuntimeModule = undefined;crates/rspack_plugin_runtime/src/runtime_module/on_chunk_loaded.rsOnChunkLoadedRuntimeModuleArchivedOnChunkLoadedRuntimeModulevar deferred = [];
<%- ON_CHUNKS_LOADED %> = <%- basicFunction("result, chunkIds, fn, priority") %> {
if (chunkIds) {
priority = priority || 0;
for (var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--)
deferred[i] = deferred[i - 1];
deferred[i] = [chunkIds, fn, priority];
return;
}
var notFulfilled = Infinity;
for (var i = 0; i < deferred.length; i++) {
<%- destructureArray("chunkIds, fn, priority", "deferred[i]") %>
var fulfilled = true;
for (var j = 0; j < chunkIds.length; j++) {
if (
(priority & (1 === 0) || notFulfilled >= priority) &&
Object.keys(<%- ON_CHUNKS_LOADED %>).every(<%- returningFunction("__webpack_require__.O[key](chunkIds[j])", "key") %>)<%# dojang template engine limitation: variables can't be rendered in functions, so __webpack_require__.O needs to be hard-coded %>
) {
chunkIds.splice(j--, 1);
} else {
fulfilled = false;
if (priority < notFulfilled) notFulfilled = priority;
}
}
if (fulfilled) {
deferred.splice(i--, 1);
var r = fn();
if (r !== undefined) result = r;
}
}
return result;
};
crates/rspack_plugin_runtime/src/runtime_module/public_path.rsPublicPathRuntimeModuleArchivedPublicPathRuntimeModulepublic_path";ReadFileChunkLoadingRuntimeModuleArchivedReadFileChunkLoadingRuntimeModule<%- ON_CHUNKS_LOADED %>.readFileVm = <%- returningFunction("installedChunks[chunkId]===0", "chunkId" ) %>;var installChunk = <%- basicFunction("chunk") %> {
var moreModules = chunk.modules, chunkIds = chunk.ids,
runtime = chunk.runtime;
for (var moduleId in moreModules) {
if (<%- HAS_OWN_PROPERTY %>(moreModules, moduleId)) {
<%- MODULE_FACTORIES %>[moduleId] = moreModules[moduleId];
}
}
if (runtime) runtime(<%- REQUIRE %> );
for (var i = 0; i < chunkIds.length; i++) {
if (installedChunks[chunkIds[i]]) {
installedChunks[chunkIds[i]][0]();
}
installedChunks[chunkIds[i]] = 0;
}
<%- _with_on_chunk_loaded %>
};var installedChunkData = installedChunks[chunkId];
if (installedChunkData !== 0) { // 0 means "already installed".
// array of [resolve, reject, promise] means "currently loading"
if (installedChunkData) {
promises.push(installedChunkData[2]);
} else {
if (<%- _js_matcher %>) { // all chunks have JS
// load the chunk and return promise to it
var promise = new Promise(function (resolve, reject) {
installedChunkData = installedChunks[chunkId] = [resolve, reject];
var filename = require('path').join(
__dirname, "<%- _output_dir %>" + <%- GET_CHUNK_SCRIPT_FILENAME %>(chunkId));
require('fs').readFile(filename, 'utf-8', function (err, content) {
if (err) return reject(err);
var chunk = {};
require('vm').runInThisContext(
'(function(exports, require, __dirname, __filename) {' +
content + '\n})',
filename)(
chunk, require, require('path').dirname(filename), filename);
installChunk(chunk);
});
});
promises.push(installedChunkData[2] = promise);
} <%- _match_fallback %>
}
}module.exports = <%- REQUIRE %>;
<%- EXTERNAL_INSTALL_CHUNK %> = installChunk;function loadUpdateChunk(chunkId, updatedModulesList) {
return new Promise(function(resolve, reject) {
var filename = require('path').join(__dirname, "" + <%- GET_CHUNK_UPDATE_SCRIPT_FILENAME %>(chunkId));
require('fs').readFile(filename, 'utf-8', function(err, content) {
if(err) return reject(err);
var update = {};
require('vm').runInThisContext('(function(exports, require, __dirname, __filename) {' + content + '\n})', filename)(update, require, require('path').dirname(filename), filename);
var updatedModules = update.modules;
var runtime = update.runtime;
for(var moduleId in updatedModules) {
if(<%- HAS_OWN_PROPERTY %>(updatedModules, moduleId)) {
currentUpdate[moduleId] = updatedModules[moduleId];
if(updatedModulesList) updatedModulesList.push(moduleId);
}
}
if(runtime) currentUpdateRuntime.push(runtime);
resolve();
});
});
}<%- HMR_DOWNLOAD_MANIFEST %> = <%- basicFunction("") %> {
return new Promise(<%- basicFunction("resolve, reject") %> {
var filename = require('path').join(__dirname, "<%- _output_dir %>" + <%- GET_UPDATE_MANIFEST_FILENAME %>());
require('fs').readFile(filename, 'utf-8', <%- basicFunction("err, content") %> {
if (err) {
if (err.code === "ENOENT") return resolve();
return reject(err);
}
try { resolve(JSON.parse(content)); }
catch (e) { reject(e); }
});
});
}_readFileVm_with_on_chunk_loaded
// ReadFile + VM.run chunk loading for javascript"
__webpack_require__.f.readFileVm = function (chunkId, promises) {
};
readFileVmcrates/rspack_plugin_runtime/src/runtime_module/relative_url.rsRelativeUrlRuntimeModule<%- RELATIVE_URL %> = function RelativeURL(url) {
var realUrl = new URL(url, "x:/");
var values = {};
for (var key in realUrl) values[key] = realUrl[key];
values.href = url;
values.pathname = url.replace(/[?#].*/, "");
values.origin = values.protocol = "";
values.toString = values.toJSON = <%- returningFunction("url", "") %>
for (var key in values) Object.defineProperty(this, key, { enumerable: true, configurable: true, value: values[key] });
};
<%- RELATIVE_URL %>.prototype = URL.prototype;ArchivedRequireChunkLoadingRuntimeModule// require() chunk loading for javascript
<%- ENSURE_CHUNK_HANDLERS %>.require = <%- basicFunction("chunkId, promises") %> {
installedChunks[chunkId] = 1;
}// require() chunk loading for javascript
<%- ENSURE_CHUNK_HANDLERS %>.require = <%- basicFunction("chunkId, promises") %> {
// "1" is the signal for "already loaded"
if (!installedChunks[chunkId]) {
if (<%- _js_matcher %>) {
installChunk(require("<%- _output_dir %>" + <%- GET_CHUNK_SCRIPT_FILENAME %>(chunkId)));
} else installedChunks[chunkId] = 1;
}
};<%- ON_CHUNKS_LOADED %>.require = <%- returningFunction("installedChunks[chunkId]", "chunkId") %>// object to store loaded chunks
// "1" means "loaded", otherwise not loaded yet
var installChunk = <%- basicFunction("chunk") %> {
var moreModules = chunk.modules, chunkIds = chunk.ids, runtime = chunk.runtime;
for (var moduleId in moreModules) {
if (<%- HAS_OWN_PROPERTY %>(moreModules, moduleId)) {
<%- MODULE_FACTORIES %>[moduleId] = moreModules[moduleId];
}
}
if (runtime) runtime(<%- REQUIRE %>);
for (var i = 0; i < chunkIds.length; i++) installedChunks[chunkIds[i]] = 1;
<%- _with_on_chunk_loaded %>
};function loadUpdateChunk(chunkId, updatedModulesList) {
var update = require("./" + <%- GET_CHUNK_UPDATE_SCRIPT_FILENAME %>(chunkId));
var updatedModules = update.modules;
var runtime = update.runtime;
for (var moduleId in updatedModules) {
if (<%- HAS_OWN_PROPERTY %>(updatedModules, moduleId)) {
currentUpdate[moduleId] = updatedModules[moduleId];
if (updatedModulesList) updatedModulesList.push(moduleId);
}
}
if (runtime) currentUpdateRuntime.push(runtime);
}<%- HMR_DOWNLOAD_MANIFEST %> = <%- basicFunction("") %> {
return Promise.resolve()
.then(<%- basicFunction("") %> {
return require("./" + <%- GET_UPDATE_MANIFEST_FILENAME %>());
})['catch'](<%- basicFunction("err") %> {
if (err.code !== 'MODULE_NOT_FOUND') throw err;
});
};crates/rspack_plugin_runtime/src/runtime_module/rspack_unique_id.rsRspackUniqueIdRuntimeModuleArchivedRspackUniqueIdRuntimeModulebundler_versionbundler_name__webpack_require__.ruid = "bundler=$BUNDLER_NAME$@$BUNDLER_VERSION$";
$BUNDLER_NAME$$BUNDLER_VERSION$crates/rspack_plugin_runtime/src/runtime_module/rspack_version.rsRspackVersionRuntimeModuleArchivedRspackVersionRuntimeModule<%- RSPACK_VERSION %> = <%- returningFunction(_version, "") %>crates/rspack_plugin_runtime/src/runtime_module/runtime_id.rsRuntimeIdRuntimeModuleArchivedRuntimeIdRuntimeModuleAt least one runtimeRuntimeIdRuntimeModule must be in a single runtimecrates/rspack_plugin_runtime/src/runtime_module/startup_chunk_dependencies.rsStartupChunkDependenciesRuntimeModuleArchivedStartupChunkDependenciesRuntimeModulevar next = <%- STARTUP %>
<%- STARTUP %> = <%- basicFunction("") %> {
<%- _body %>
}("").then(next);return Promise.all([]).then(next);Invalid json to stringreturn Promise.all()).then(next);internal error: entered unreachable code: should have chunk for StartupChunkDependenciesRuntimeModule");crates/rspack_plugin_runtime/src/runtime_module/startup_entrypoint.rsStartupEntrypointRuntimeModuleArchivedStartupEntrypointRuntimeModule<%- STARTUP_ENTRYPOINT %> = <%- basicFunction("result, chunkIds, fn") %> {
// arguments: chunkIds, moduleId are deprecated
var moduleId = chunkIds;
if (!fn) chunkIds = result, fn = <%- returningFunction("__webpack_require__(__webpack_require__.s = moduleId)", "") %>
chunkIds.map(<%- ENSURE_CHUNK %>, <%- REQUIRE %>)
var r = fn();
return r === undefined ? result : r;
}<%- STARTUP_ENTRYPOINT %> = <%- basicFunction("result, chunkIds, fn") %> {
// arguments: chunkIds, moduleId are deprecated
var moduleId = chunkIds;
if (!fn) chunkIds = result, fn = <%- returningFunction("__webpack_require__(__webpack_require__.s = moduleId)", "") %>
return Promise.all(chunkIds.map(<%- ENSURE_CHUNK %>, <%- REQUIRE %>)).then(<%- basicFunction("") %> {
var r = fn();
return r === undefined ? result : r;
});
}crates/rspack_plugin_runtime/src/runtime_module/system_context.rsSystemContextRuntimeModuleArchivedSystemContextRuntimeModule = __system_context__chunk to_string failedStartupChunkDependenciesPluginStartupChunkDependenciesPluginInnerchunk_loadingcrates/rspack_plugin_runtime/src/startup_chunk_dependencies.rsStartupChunkDependenciesPlugin:additional_tree_runtime_requirementsrspack_plugin_runtime::startup_chunk_dependenciesStartupChunkDependenciesPlugin:runtime_requirements_in_treecrates/rspack_plugin_runtime/src/chunk_prefetch_preload.rsChunkPrefetchPreloadPlugin:additional_chunk_runtime_requirementsrspack_plugin_runtime::chunk_prefetch_preloadChunkPrefetchPreloadPlugin:additional_tree_runtime_requirementscrates/rspack_plugin_runtime/src/bundler_info.rsBundlerInfoPlugin:additional_tree_runtime_requirementsrspack_plugin_runtime::bundler_infoBundlerInfoPlugin:runtime_requirements_in_treecrates/rspack_plugin_runtime/src/runtime_module_from_js.rsRuntimeModuleFromJsArchivedRuntimeModuleFromJsdependent_hashisolatestagecrates/rspack_plugin_runtime/src/drive.rshook:RuntimePluginCreateScriptrspack_plugin_runtime::drivehook:RuntimePluginLinkPreloadhook:RuntimePluginLinkPrefetchSinglecrates/rspack_plugin_runtime_chunk/src/lib.rsRuntimeChunkPlugin:add_entryrspack_plugin_runtime_chunk(?i)^data:([^;,]+)?((?:;[^;,]+)*?)(?:;(base64)?)?,(.*)$Invalid Regexcrates/rspack_plugin_schemes/src/data_uri.rscrates/rspack_plugin_schemes/src/http_uri/http_cache.rsaccept-encodinggzip, deflate, bruser-agentif-none-matchcache-controlRequest failed with status: content-typeInvalid cache pathinvalid-url_