add debug logging for static file asset registration

This commit is contained in:
Nacho Codoñer
2025-09-23 12:54:26 +02:00
parent e53f76baee
commit fbea4c84dc

View File

@@ -9,6 +9,7 @@ import {
RSPACK_ASSETS_CONTEXT,
RSPACK_HOT_UPDATE_REGEX,
} from "./lib/constants";
import { isMeteorAppDebug } from "meteor/tools-core/lib/meteor";
// Define constants for both development and production
const rspackChunksContext = process.env.RSPACK_CHUNKS_CONTEXT || RSPACK_CHUNKS_CONTEXT;
@@ -145,6 +146,10 @@ function registerRspackStaticAsset(arch, pathname, filePath) {
if (staticFiles[pathname]) {
// Ensure the entry is marked as cacheable
staticFiles[pathname].cacheable = true;
if (isMeteorAppDebug()) {
console.log(`Registering rspack asset: ${archName} ${pathname} cacheable ${staticFiles[pathname].cacheable}`);
}
return staticFiles[pathname];
}
@@ -165,6 +170,10 @@ function registerRspackStaticAsset(arch, pathname, filePath) {
type
};
if (isMeteorAppDebug()) {
console.log(`Registering rspack asset: ${archName} ${pathname} cacheable ${staticFiles[pathname].cacheable}`);
}
return staticFiles[pathname];
}