Skip to content

Commit

Permalink
catch build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
thecristen committed Aug 7, 2024
1 parent 0a1f2ac commit 874a3fc
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions lib/dotcom/react/react.ex
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,18 @@ defmodule Dotcom.React do
def dev_build(nil, _), do: :ok

def dev_build(path, cmd_fn) do
{_, 0} =
cmd_fn.(
"npm",
["run", "webpack:build:react"],
cd: path
)

:ok
case cmd_fn.(
"npm",
["run", "webpack:build:react"],
cd: path
) do
{_, 0} ->
:ok
{output, _} ->
_ =
Logger.warning(fn -> "react_renderer build error #{inspect(output)}" end)

:ok
end
end
end

0 comments on commit 874a3fc

Please sign in to comment.