-
Notifications
You must be signed in to change notification settings - Fork 1k
PublishWithContainerFiles + ASP.NET Core Static Assets #19768
Copy link
Copy link
Open
Labels
area-deploymentarea-polyglotIssues related to polyglot apphostsIssues related to polyglot apphostsneeds-area-labelAn area label is needed to ensure this gets routed to the appropriate area ownersAn area label is needed to ensure this gets routed to the appropriate area ownerstriage:bot-seenAspire triage bot has seen this issueAspire triage bot has seen this issue
Description
Activity
Metadata
Metadata
Assignees
Labels
area-deploymentarea-polyglotIssues related to polyglot apphostsIssues related to polyglot apphostsneeds-area-labelAn area label is needed to ensure this gets routed to the appropriate area ownersAn area label is needed to ensure this gets routed to the appropriate area ownerstriage:bot-seenAspire triage bot has seen this issueAspire triage bot has seen this issue
Is your feature request related to a problem? Please describe the problem.
PublishWithContainerFiles(with eg.AddViteAppfor the "Static frontend served by a backend"), copies files after the backend build has completed.This means that ASP.NET Core's "Static Asset" build time compression and fingerprinting doesn't include those files.
The means my static assets don't have etags and aren't compressed unless I do something (I haven't worked out exactly what yet). This should work out of the box.
Describe the solution you'd like
Simplest would be to delay the backend build until after the front end files are copied. Not ideal.
Better would be for the fingerprinting and compression process to run as part of the copy to the container image process. Alternatively add the right dependencies to the backend build so that it waits if needed and everything continues in parallel if possible.
Maybe at least add some docs.