diff --git a/installer/templates/phx_single/config/config.exs.eex b/installer/templates/phx_single/config/config.exs.eex index c58796a9c7..0d4971c2a7 100644 --- a/installer/templates/phx_single/config/config.exs.eex +++ b/installer/templates/phx_single/config/config.exs.eex @@ -45,7 +45,7 @@ config :esbuild, args: ~w(js/app.js --bundle --target=es2022 --outdir=../priv/static/assets/js --external:/fonts/* --external:/images/* --alias:@=.), cd: Path.expand("..<%= if @in_umbrella, do: "/apps/#{@app_name}" %>/assets", __DIR__), - env: %{"NODE_PATH" => [Path.expand("../deps", __DIR__), Mix.Project.build_path()]} + env: %{"NODE_PATH" => [Mix.Project.build_path(), Path.expand("../deps", __DIR__)]} ]<% end %><%= if @css do %> # Configure tailwind (the version is required) @@ -57,7 +57,7 @@ config :tailwind, --output=priv/static/assets/css/app.css ), cd: Path.expand("..<%= if @in_umbrella, do: "/apps/#{@app_name}" %>", __DIR__), - env: %{"NODE_PATH" => [Path.expand("../deps", __DIR__), Mix.Project.build_path()]} + env: %{"NODE_PATH" => [Mix.Project.build_path(), Path.expand("../deps", __DIR__)]} ]<% end %> # Configure Elixir's Logger diff --git a/installer/templates/phx_umbrella/apps/app_name_web/config/config.exs.eex b/installer/templates/phx_umbrella/apps/app_name_web/config/config.exs.eex index 8c4743db9a..8c02affb66 100644 --- a/installer/templates/phx_umbrella/apps/app_name_web/config/config.exs.eex +++ b/installer/templates/phx_umbrella/apps/app_name_web/config/config.exs.eex @@ -24,7 +24,7 @@ config :esbuild, args: ~w(js/app.js --bundle --target=es2022 --outdir=../priv/static/assets/js --external:/fonts/* --external:/images/* --alias:@=.), cd: Path.expand("../apps/<%= @web_app_name %>/assets", __DIR__), - env: %{"NODE_PATH" => [Path.expand("../deps", __DIR__), Mix.Project.build_path()]} + env: %{"NODE_PATH" => [Mix.Project.build_path(), Path.expand("../deps", __DIR__)]} ]<% end %><%= if @css do %> # Configure tailwind (the version is required) @@ -36,5 +36,5 @@ config :tailwind, --output=priv/static/assets/css/app.css ), cd: Path.expand("../apps/<%= @web_app_name %>", __DIR__), - env: %{"NODE_PATH" => [Path.expand("../deps", __DIR__), Mix.Project.build_path()]} + env: %{"NODE_PATH" => [Mix.Project.build_path(), Path.expand("../deps", __DIR__)]} ]<% end %>