@@ -23,17 +23,6 @@ process.env.BSB_PROJECT_ROOT = cwd;
23
23
const isTtyError = process . stderr . isTTY ;
24
24
const isTtyStd = process . stdout . isTTY ;
25
25
26
- // If the project uses gentype and uses custom file extension
27
- // via generatedFileExtension, ignore them in watch mode
28
- var bsConfigFile = path . join ( cwd , bsconfig ) ;
29
- var genTypeFileExtension = ".gen.tsx" ;
30
- if ( fs . existsSync ( bsConfigFile ) ) {
31
- var genTypeConfig = require ( bsConfigFile ) . gentypeconfig ;
32
- if ( genTypeConfig ) {
33
- genTypeFileExtension = genTypeConfig . generatedFileExtension ;
34
- }
35
- }
36
-
37
26
let verbose = false ;
38
27
39
28
/**
@@ -358,14 +347,13 @@ Please pick a different one using the \`-ws [host:]port\` flag from bsb.`);
358
347
// This could cause problems if source builds (generating js files in the same directory) are supported.
359
348
if ( ! fileName ) return true ;
360
349
361
- return ! (
362
- fileName === ".merlin" ||
363
- fileName . endsWith ( ".js" ) ||
364
- fileName . endsWith ( ".mjs" ) ||
365
- fileName . endsWith ( ".cjs" ) ||
366
- fileName . endsWith ( genTypeFileExtension ) ||
367
- watchGenerated . indexOf ( fileName ) >= 0 ||
368
- fileName . endsWith ( ".swp" )
350
+ return (
351
+ ( ( fileName . endsWith ( ".res" ) ||
352
+ fileName . endsWith ( ".resi" ) ||
353
+ fileName . endsWith ( ".ml" ) ||
354
+ fileName . endsWith ( ".mli" ) ) &&
355
+ ! watchGenerated . includes ( fileName ) ) ||
356
+ fileName === bsconfig
369
357
) ;
370
358
}
371
359
0 commit comments