-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Closed
Copy link
Labels
Theme: inner-loopaffected-fewThis issue impacts only small number of customersThis issue impacts only small number of customersarea-commandlinetoolsIncludes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPIIncludes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPIenhancementThis issue represents an ask for new feature or an enhancement to an existing oneThis issue represents an ask for new feature or an enhancement to an existing onefeature-hot-reloadThis issue is related to the Hot Reload feaatureThis issue is related to the Hot Reload feaatureseverity-nice-to-haveThis label is used by an internal toolThis label is used by an internal tool
Milestone
Description
Add support for dotnet watch run to refresh the browser window when changes to static files are detected.
- Default set of static files watched should include:
*.css,*.js,*.jpg,*.png,*.gif - Static files to watch should be configurable via existing mechanism in MSBuild (i.e.
<Watch />item type andwatchitem metadata) - When changes to configured static files are detected the browser should have the content cache for the current app cleared via the
Clear-Site-Dataheader before being refreshed- Note this capability needs to be investigated to determine its utility and applicability to this feature, along with the best way to incorporate it, e.g. as a separate
Fetchrequest to the app site before the refresh, or as an added response header to the next HTML response from the site after a change is detected.
- Note this capability needs to be investigated to determine its utility and applicability to this feature, along with the best way to incorporate it, e.g. as a separate
- The different actions performed by
dotnet watch runwhen changes to different files are detected should be represented via MSBuild metadata like the file watch list itself, e.g. build and refresh browser, build only, refresh browser only, dynamically swap out image/CSS (future), etc. This will allow for customization by the user for more advanced scenarios along with different defaults for different app models (e.g. Blazor component CSS must be rebuilt due to the CSS isolation feature)- Approach 1, different metadata attribute per action:
<Content Include="**/*.css" Watch="true" OnWatchChangeBuild="False" OnWatchChangeRefreshBrowser="True" />
- Approach 2, single metadata attribute but multiple values:
<Content Include="**/*.css" Watch="true" OnWatchChange="RefreshBrowser;SomethingElse" />
- Approach 1, different metadata attribute per action:
Dalqin, Alirezaja1384, ivanjx and zboyles
Metadata
Metadata
Assignees
Labels
Theme: inner-loopaffected-fewThis issue impacts only small number of customersThis issue impacts only small number of customersarea-commandlinetoolsIncludes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPIIncludes: Command line tools, dotnet-dev-certs, dotnet-user-jwts, and OpenAPIenhancementThis issue represents an ask for new feature or an enhancement to an existing oneThis issue represents an ask for new feature or an enhancement to an existing onefeature-hot-reloadThis issue is related to the Hot Reload feaatureThis issue is related to the Hot Reload feaatureseverity-nice-to-haveThis label is used by an internal toolThis label is used by an internal tool