Skip to content

Commit d866d77

Browse files
committedFeb 26, 2025··
feat(swc): add reload application when compiling to mjs
1 parent 1f7c756 commit d866d77

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎lib/compiler/swc/swc-compiler.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,8 @@ export class SwcCompiler extends BaseCompiler {
254254
: join(process.cwd(), options.cliOptions.outDir!);
255255
const watcher = chokidar.watch(dir, {
256256
ignored: (file, stats) =>
257-
(stats?.isFile() && !file.endsWith('.js')) as boolean,
257+
(stats?.isFile() &&
258+
!(file.endsWith('.js') || file.endsWith('.mjs'))) as boolean,
258259
ignoreInitial: true,
259260
awaitWriteFinish: {
260261
stabilityThreshold: 50,

0 commit comments

Comments
 (0)
Please sign in to comment.