Skip to content

multiple phx.digest in mix alias doesn't work #5752

Closed
@chulkilee

Description

@chulkilee

Environment

  • Elixir version (elixir -v): Elixir 1.16.1 (compiled with Erlang/OTP 26)
  • Phoenix version (mix deps): 1.7.11
  • Operating system:

Actual behavior

I have one app (myapp) with two phoenix endpoints (let's say myapp_a and myapp_b) with own assets (/assets-a -> /priv/static-a/assets for example) with separate tailwind/esbuild profile.

(I'll work on minimal repo reproducing this when I have time..)

To build all assets digest, I changed the default assets.deploy task like this:

"assets.deploy": [
  "tailwind myapp_a --minify",
  "esbuild myapp_a --minify",
  "phx.digest priv/static-a",
  "tailwind myapp_b --minify",
  "esbuild myapp_b --minify",
  "phx.digest priv/static-b"
]

but the later phx.digest doesn't show "Check your digested files at "priv/static-b" message - only the first phx.digest worked.

Expected behavior

It should work as I run individual mix tasks - I tested following shell script and it correctly generated digest/manifest for the two.

mix tailwind myapp_a --minify \
&& mix esbuild myapp_a --minify \
&& mix phx.digest priv/static-a \
&& mix tailwind myapp_b --minify \
&& mix esbuild myapp_b --minify \
&& mix phx.digest priv/static-b

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions