@plumeria/turbopack-loader 7.4.2 → 7.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -6,5 +6,8 @@ interface LoaderContext {
6
6
  addDependency: (path: string) => void;
7
7
  clearDependencies: () => void;
8
8
  }
9
+ declare global {
10
+ var cleanupTimeout: NodeJS.Timeout | undefined;
11
+ }
9
12
  export default function loader(this: LoaderContext, source: string): Promise<void>;
10
13
  export {};
package/dist/index.js CHANGED
@@ -1165,6 +1165,11 @@ async function loader(source) {
1165
1165
  return callback(null, transformedSource);
1166
1166
  if (extractedSheets.length > 0 && process.env.NODE_ENV === 'development') {
1167
1167
  (0, fs_1.appendFileSync)(VIRTUAL_FILE_PATH, optInCSS, 'utf-8');
1168
+ if (global.cleanupTimeout)
1169
+ clearTimeout(global.cleanupTimeout);
1170
+ global.cleanupTimeout = setTimeout(() => {
1171
+ (0, fs_1.writeFileSync)(VIRTUAL_FILE_PATH, optInCSS, 'utf-8');
1172
+ }, 500);
1168
1173
  }
1169
1174
  return callback(null, transformedSource + postfix);
1170
1175
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plumeria/turbopack-loader",
3
- "version": "7.4.2",
3
+ "version": "7.5.1",
4
4
  "description": "Plumeria Turbopack-loader",
5
5
  "author": "Refirst 11",
6
6
  "license": "MIT",
@@ -22,7 +22,7 @@
22
22
  "zero-virtual.css"
23
23
  ],
24
24
  "dependencies": {
25
- "@plumeria/utils": "^7.4.2"
25
+ "@plumeria/utils": "^7.5.1"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@swc/core": "1.15.8",