Skip to content

Commit

Permalink
fix: ignore fs-specific tmp files in watch mode (#729)
Browse files Browse the repository at this point in the history
  • Loading branch information
PeachScript committed Nov 7, 2023
1 parent b4bd2bb commit dce4be9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/builder/bundless/index.ts
Expand Up @@ -14,10 +14,10 @@ import {
DEFAULT_BUNDLESS_IGNORES,
WATCH_DEBOUNCE_STEP,
} from '../../constants';
import { logger } from '../../utils';
import type { BundlessConfigProvider } from '../config';
import getDeclarations from './dts';
import runLoaders from './loaders';
import { logger } from '../../utils';

const debugLog = debug(DEBUG_BUNDLESS_NAME);

Expand Down Expand Up @@ -203,6 +203,12 @@ async function bundless(
cwd: opts.cwd,
ignoreInitial: true,
ignored: DEFAULT_BUNDLESS_IGNORES,
// to avoid catch temp file from some special file-system
// ex. a.txt => a.txt.12344345 in CloudIDE
awaitWriteFinish: {
stabilityThreshold: 20,
pollInterval: 10,
},
})
.on('add', handleTransform)
.on('change', handleTransform)
Expand Down

0 comments on commit dce4be9

Please sign in to comment.