Framework updates

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
root
2026-03-04 23:20:19 +00:00
parent a89daf3d43
commit 3ed8517b2a
891 changed files with 11126 additions and 9600 deletions

View File

@@ -7,7 +7,10 @@
const { RawSource } = require("webpack-sources");
const Module = require("../Module");
const { REMOTE_AND_SHARE_INIT_TYPES } = require("../ModuleSourceTypeConstants");
const {
JAVASCRIPT_TYPES,
REMOTE_AND_SHARE_INIT_TYPES
} = require("../ModuleSourceTypeConstants");
const { WEBPACK_MODULE_TYPE_REMOTE } = require("../ModuleTypeConstants");
const RuntimeGlobals = require("../RuntimeGlobals");
const makeSerializable = require("../util/makeSerializable");
@@ -34,6 +37,7 @@ const RemoteToExternalDependency = require("./RemoteToExternalDependency");
/** @typedef {import("../serialization/ObjectMiddleware").ObjectDeserializerContext} ObjectDeserializerContext */
/** @typedef {import("../serialization/ObjectMiddleware").ObjectSerializerContext} ObjectSerializerContext */
/** @typedef {import("../util/fs").InputFileSystem} InputFileSystem */
/** @typedef {import("../Module").BasicSourceTypes} BasicSourceTypes */
const RUNTIME_REQUIREMENTS = new Set([RuntimeGlobals.module]);
@@ -137,6 +141,19 @@ class RemoteModule extends Module {
return REMOTE_AND_SHARE_INIT_TYPES;
}
/**
* Basic source types are high-level categories like javascript, css, webassembly, etc.
* We only have built-in knowledge about the javascript basic type here; other basic types may be
* added or changed over time by generators and do not need to be handled or detected here.
*
* Some modules, e.g. RemoteModule, may return non-basic source types like "remote" and "share-init"
* from getSourceTypes(), but their generated output is still JavaScript, i.e. their basic type is JS.
* @returns {BasicSourceTypes} types available (do not mutate)
*/
getSourceBasicTypes() {
return JAVASCRIPT_TYPES;
}
/**
* @param {ModuleGraph} moduleGraph the module graph
* @param {boolean | undefined} strict the importing module is strict