mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-06 03:34:40 +00:00
18 lines
484 B
TypeScript
18 lines
484 B
TypeScript
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());
|
|
}
|
|
});
|
|
},
|
|
};
|
|
}
|