From 8b0f95eb7a9f138f9036d997af65825590fc6d81 Mon Sep 17 00:00:00 2001 From: Fran Dios Date: Mon, 13 Feb 2023 21:39:18 +0900 Subject: [PATCH 1/2] Log errors in dev initial build --- .changeset/tidy-doors-judge.md | 5 +++++ packages/remix-dev/compiler/watch.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/tidy-doors-judge.md diff --git a/.changeset/tidy-doors-judge.md b/.changeset/tidy-doors-judge.md new file mode 100644 index 00000000000..e0a7ae2d014 --- /dev/null +++ b/.changeset/tidy-doors-judge.md @@ -0,0 +1,5 @@ +--- +"@remix-run/dev": patch +--- + +Log errors thrown during initial build in development. diff --git a/packages/remix-dev/compiler/watch.ts b/packages/remix-dev/compiler/watch.ts index 3700e4e286a..50cccf693ff 100644 --- a/packages/remix-dev/compiler/watch.ts +++ b/packages/remix-dev/compiler/watch.ts @@ -61,7 +61,7 @@ export async function watch( let compiler = createRemixCompiler(config, options); // initial build - await compile(compiler); + await compile(compiler, { onCompileFailure }); onInitialBuild?.(Date.now() - start); let restart = debounce(async () => { From 0b0bfa528e8816a2755d8434f1db3beaaf64b862 Mon Sep 17 00:00:00 2001 From: Fran Dios Date: Mon, 13 Feb 2023 21:55:07 +0900 Subject: [PATCH 2/2] Pass onCompileFailure in another call --- packages/remix-dev/compiler/watch.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/remix-dev/compiler/watch.ts b/packages/remix-dev/compiler/watch.ts index 50cccf693ff..f8bad392d21 100644 --- a/packages/remix-dev/compiler/watch.ts +++ b/packages/remix-dev/compiler/watch.ts @@ -77,7 +77,7 @@ export async function watch( } compiler = createRemixCompiler(config, options); - let assetsManifest = await compile(compiler); + let assetsManifest = await compile(compiler, { onCompileFailure }); onRebuildFinish?.(Date.now() - start, assetsManifest); }, 500);