Skip to content

Commit

Permalink
fix: swc compiler does not watch files
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilmysliwiec committed Jan 22, 2025
1 parent 2fa2079 commit 8aaa9df
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/compiler/swc/swc-compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,9 @@ export class SwcCompiler extends BaseCompiler {
const dir = isAbsolute(options.cliOptions.outDir!)
? options.cliOptions.outDir!
: join(process.cwd(), options.cliOptions.outDir!);
const paths = join(dir, '**/*.js');
const watcher = chokidar.watch(paths, {
const watcher = chokidar.watch(dir, {
ignored: (file, stats) =>
(stats?.isFile() && !file.endsWith('.js')) as boolean,
ignoreInitial: true,
awaitWriteFinish: {
stabilityThreshold: 50,
Expand Down

0 comments on commit 8aaa9df

Please sign in to comment.