Build: Avoids rebuilding Backoffice unless it is required#19189
Merged
iOvergaard merged 1 commit intocontribfrom Apr 29, 2025
Merged
Build: Avoids rebuilding Backoffice unless it is required#19189iOvergaard merged 1 commit intocontribfrom
iOvergaard merged 1 commit intocontribfrom
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Some people have noticed how the Backoffice seems to build even though no files are changed. Our theory is that this happens simply because there are too many input files to consider for the MSBuild target.
In v13, the StaticAssets build was only triggered by the existence of either the output folder or a preserve.* marker file. Here, we also check for the node_modules/.package-lock.json file before reinstalling npm dependencies. Additionally, we now only run
npm installrather thannpm cito optimise the build.As an aide, you can check how it was done in V13 here: https://github.com/umbraco/Umbraco-CMS/blob/v13/dev/src/Umbraco.Cms.StaticAssets/Umbraco.Cms.StaticAssets.csproj
How to test
dotnet cleanor Clean Solutiondotnet rundotnet cleanagaindotnet runagainHint: You can CD into the Umbraco.Cms.StaticAssets directory and run
dotnet build -v diag --no-dependenciesand check the logged messages. It should say that the builds were skipped: