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

@@ -8,7 +8,10 @@
const { RawSource } = require("webpack-sources");
const OriginalSource = require("webpack-sources").OriginalSource;
const Module = require("./Module");
const { RUNTIME_TYPES } = require("./ModuleSourceTypeConstants");
const {
JAVASCRIPT_TYPES,
RUNTIME_TYPES
} = require("./ModuleSourceTypeConstants");
const { WEBPACK_MODULE_TYPE_RUNTIME } = require("./ModuleTypeConstants");
/** @typedef {import("./config/defaults").WebpackOptionsNormalizedWithDefaults} WebpackOptions */
@@ -29,6 +32,7 @@ const { WEBPACK_MODULE_TYPE_RUNTIME } = require("./ModuleTypeConstants");
/** @typedef {import("./ResolverFactory").ResolverWithOptions} ResolverWithOptions */
/** @typedef {import("./util/Hash")} Hash */
/** @typedef {import("./util/fs").InputFileSystem} InputFileSystem */
/** @typedef {import("./Module").BasicSourceTypes} BasicSourceTypes */
class RuntimeModule extends Module {
/**
@@ -138,6 +142,19 @@ class RuntimeModule extends Module {
return RUNTIME_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 {CodeGenerationContext} context context for code generation
* @returns {CodeGenerationResult} result