SharePoint / SharePoint/sp-dev-docs

Updates not reflected on Page Load due to build.rig task order

Open
#9,914 5 comments 0 reactions 1 assignee View on GitHub

@Amey-MSFT is already working on this.

Since May 29, 2025.

area:spfx Needs: Triage :mag: sharepoint-developer-support type:bug-confirmed
Dominant language
PowerShell
Stars
1.4k
Forks
1.1k
Avg merge
4d 12h
Merged PRs (30d)
12

Description

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

💥 SharePoint Framework

Developer environment

None

What browser(s) / client(s) have you tested
  • 💥 Internet Explorer
  • 💥 Microsoft Edge
  • 💥 Google Chrome
  • 💥 FireFox
  • 💥 Safari
  • mobile (iOS/iPadOS)
  • mobile (Android)
  • not applicable
  • other (enter in the "Additional environment details" area below)
Additional environment details
  • browser version (latest)
  • SPFx version 1.19.0
  • Node.js version 18.17.1
Describe the bug / error

Due to the predefined ordering of packing tasks in build.rig, the subtask spfx-serve renders a page before webpack completes. The reload task does not appear to reload the browser, and therefore forces a manual refresh on behalf of the developer once webpack tasks are completed.

I looked into adding pre-telemetry and pre-build tasks by copying the execution of the predefined subtasks, but this does not seem to work (and can't find any examples of anyone doing this).

Steps to reproduce
  1. Make updates to your SPFX
  2. Run gulp serve
  3. SPFX-serve loads the page before updates are actually compiled
Expected behavior

Ideally, spfx-serve should be user-configurable to run at any point in the pipeline, but personally I would like it to be last by default. Yes, it's nice to have hot reload, but when working with multiple developers on a complex project, we will frequently be out of watch mode.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.