Skip to content

Commit

Permalink
new
Browse files Browse the repository at this point in the history
  • Loading branch information
xHomu committed Aug 16, 2023
1 parent 3b0530a commit 2b81f4d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const chokidar =
* @typedef {import('@remix-run/node').ServerBuild} ServerBuild
*/
const BUILD_PATH = path.resolve("./build/index.js");
const WATCH_PATH = path.resolve("./build/metafile.server.json");

/**
* Initial build
Expand Down Expand Up @@ -211,7 +212,7 @@ function createDevRequestHandler(): RequestHandler {
}

chokidar
.watch(BUILD_PATH, {
.watch(WATCH_PATH, {
ignoreInitial: true,
awaitWriteFinish: { stabilityThreshold: 200 },

This comment has been minimized.

Copy link
@pcattori

pcattori Aug 17, 2023

@xHomu you probably don't need awaitWriteFinish at all anymore since the server build should be guaranteed to be completely written before any bytes are written to server metafile

This comment has been minimized.

Copy link
@xHomu

xHomu Aug 17, 2023

Author Contributor

good call, updated

This comment has been minimized.

Copy link
@xHomu

xHomu Aug 17, 2023

Author Contributor

Thanks for being the first code review on this repo!

})
Expand Down

1 comment on commit 2b81f4d

@xHomu
Copy link
Contributor Author

@xHomu xHomu commented on 2b81f4d Aug 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test safer watch path per @pcattori remix-run/remix#6919 (comment)

Please sign in to comment.