Framework updates
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
19
node_modules/webpack/lib/css/CssGenerator.js
generated
vendored
19
node_modules/webpack/lib/css/CssGenerator.js
generated
vendored
@@ -19,7 +19,7 @@ const {
|
||||
const RuntimeGlobals = require("../RuntimeGlobals");
|
||||
const Template = require("../Template");
|
||||
const CssImportDependency = require("../dependencies/CssImportDependency");
|
||||
const EntryDependency = require("../dependencies/EntryDependency");
|
||||
const HarmonyImportSideEffectDependency = require("../dependencies/HarmonyImportSideEffectDependency");
|
||||
const { getUndoPath } = require("../util/identifier");
|
||||
const memoize = require("../util/memoize");
|
||||
|
||||
@@ -470,22 +470,27 @@ class CssGenerator extends Generator {
|
||||
getTypes(module) {
|
||||
const exportType = /** @type {BuildMeta} */ (module.buildMeta).exportType;
|
||||
const sourceTypes = new Set();
|
||||
|
||||
const connections = this._moduleGraph.getIncomingConnections(module);
|
||||
|
||||
let isEntryModule = false;
|
||||
for (const connection of connections) {
|
||||
if (connection.dependency instanceof EntryDependency) {
|
||||
isEntryModule = true;
|
||||
}
|
||||
if (
|
||||
exportType === "link" &&
|
||||
connection.dependency instanceof CssImportDependency
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// when no hmr required, css module js output contains no sideEffects at all
|
||||
// js sideeffect connection doesn't require js type output
|
||||
if (connection.dependency instanceof HarmonyImportSideEffectDependency) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!connection.originModule) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (connection.originModule.type.split("/")[0] !== CSS_TYPE) {
|
||||
sourceTypes.add(JAVASCRIPT_TYPE);
|
||||
} else {
|
||||
@@ -503,7 +508,7 @@ class CssGenerator extends Generator {
|
||||
}
|
||||
}
|
||||
if (this._generatesJsOnly(module)) {
|
||||
if (sourceTypes.has(JAVASCRIPT_TYPE) || isEntryModule) {
|
||||
if (sourceTypes.has(JAVASCRIPT_TYPE)) {
|
||||
return JAVASCRIPT_TYPES;
|
||||
}
|
||||
return new Set();
|
||||
@@ -578,3 +583,5 @@ class CssGenerator extends Generator {
|
||||
}
|
||||
|
||||
module.exports = CssGenerator;
|
||||
|
||||
module.exports = CssGenerator;
|
||||
|
||||
Reference in New Issue
Block a user