Add JS-CATCH-FALLBACK-01 rule and update npm packages
Add PHP-ALIAS-01 rule: prohibit field aliasing in serialization 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
22
node_modules/webpack/lib/HotModuleReplacementPlugin.js
generated
vendored
22
node_modules/webpack/lib/HotModuleReplacementPlugin.js
generated
vendored
@@ -19,6 +19,7 @@ const {
|
||||
const NormalModule = require("./NormalModule");
|
||||
const RuntimeGlobals = require("./RuntimeGlobals");
|
||||
const WebpackError = require("./WebpackError");
|
||||
const { chunkHasCss } = require("./css/CssModulesPlugin");
|
||||
const ConstDependency = require("./dependencies/ConstDependency");
|
||||
const ImportMetaHotAcceptDependency = require("./dependencies/ImportMetaHotAcceptDependency");
|
||||
const ImportMetaHotDeclineDependency = require("./dependencies/ImportMetaHotDeclineDependency");
|
||||
@@ -817,6 +818,7 @@ To fix this, make sure to include [runtime] in the output.hotUpdateMainFilename
|
||||
filename,
|
||||
{ removedChunkIds, removedModules, updatedChunkIds, assetInfo }
|
||||
] of hotUpdateMainContentByFilename) {
|
||||
/** @type {{c: ChunkId[], r: ChunkId[], m: ModuleId[], css?: {r: ChunkId[]}}} */
|
||||
const hotUpdateMainJson = {
|
||||
c: [...updatedChunkIds],
|
||||
r: [...removedChunkIds],
|
||||
@@ -833,6 +835,26 @@ To fix this, make sure to include [runtime] in the output.hotUpdateMainFilename
|
||||
]
|
||||
};
|
||||
|
||||
// Build CSS removed chunks list (chunks in updatedChunkIds that no longer have CSS)
|
||||
/** @type {ChunkId[]} */
|
||||
const cssRemovedChunkIds = [];
|
||||
if (compilation.options.experiments.css) {
|
||||
for (const chunkId of updatedChunkIds) {
|
||||
for (const /** @type {Chunk} */ chunk of compilation.chunks) {
|
||||
if (chunk.id === chunkId) {
|
||||
if (!chunkHasCss(chunk, chunkGraph)) {
|
||||
cssRemovedChunkIds.push(chunkId);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (cssRemovedChunkIds.length > 0) {
|
||||
hotUpdateMainJson.css = { r: cssRemovedChunkIds };
|
||||
}
|
||||
|
||||
const source = new RawSource(
|
||||
(filename.endsWith(".json") ? "" : "export default ") +
|
||||
JSON.stringify(hotUpdateMainJson)
|
||||
|
||||
Reference in New Issue
Block a user