fix: crxjs plugin issues

This commit is contained in:
SethBurkart123
2025-03-26 17:00:58 +11:00
parent 68159ddd0e
commit f2b594a13b
9 changed files with 119 additions and 55 deletions
+17
View File
@@ -0,0 +1,17 @@
import fs from 'fs';
export default function touchGlobalCSSPlugin() {
return {
name: 'touch-global-css',
handleHotUpdate({ modules }) {
// log all of the staticImportedUrls
const importers = modules[0]._clientModule.importers
importers.forEach((importer) => {
if (importer.file.includes('.css')) {
console.log("touching", importer.file)
fs.utimesSync(importer.file, new Date(), new Date())
}
})
}
};
}