|
|
@@ -87,9 +87,9 @@ app.on('ready', () => {
|
|
|
const url = new URL(details.url);
|
|
|
const filePath = path.normalize(decodeURIComponent(url.pathname));
|
|
|
const relativePath = filePath.replace(path.normalize(process.resourcesPath), '').replace(/\\/g, '/').replace('//', '');
|
|
|
- console.log(`Intercepting request for: ${relativePath}`);
|
|
|
|
|
|
if (memoryCache[relativePath]) {
|
|
|
+ console.log(`Intercepting request for: ${relativePath}`);
|
|
|
let mimeType = 'text/plain';
|
|
|
if (relativePath.endsWith('.js')) {
|
|
|
mimeType = 'application/javascript';
|
|
|
@@ -101,7 +101,6 @@ app.on('ready', () => {
|
|
|
console.log(`Serving from memory: ${relativePath} as ${mimeType}`);
|
|
|
callback({ mimeType: mimeType, data: memoryCache[relativePath] });
|
|
|
} else {
|
|
|
- console.error(`File not found in memory: ${relativePath}`);
|
|
|
callback({ cancel: false });
|
|
|
}
|
|
|
});
|