Skip to content

Serve production build by default during local development - #6353

Merged
mstange merged 1 commit into
firefox-devtools:mainfrom
mstange:push-nrkysnrvtnwl
Sep 24, 2026
Merged

mstange merged 1 commit into
firefox-devtools:mainfrom
mstange:push-nrkysnrvtnwl

Conversation

@mstange

@mstange mstange commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Main | Deploy preview

Fixes #6332.

Now we have:

  • yarn start: production build, no service worker, port 4242
  • yarn start-prod: production build, with service worker, port 4243
  • yarn start-dev: development build, no service worker, port 4241

There's a bit of churn in how the filenames are determined. In the past, we were putting a hash in the filenames whenever we were building for production, including for the source map worker, and we didn't have a way to "watch" the production build.

Now that yarn start is a "watched" production build, we need to make sure that the source map worker filename does not contain a hash, otherwise the path to it that gets embedded into the main bundle would get out of sync.

The main bundle still uses a hashed filename; each rebuild updates index.html with the new path. (It's not straightforward to use a similar mechanism for the worker, because the worker and the main bundle run in separate esbuild watch contexts.)

@codecov

codecov Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.12%. Comparing base (1132ef9) to head (c9c049c).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6353   +/-   ##
=======================================
  Coverage   84.11%   84.12%           
=======================================
  Files         356      356           
  Lines       38444    38445    +1     
  Branches    10887    10888    +1     
=======================================
+ Hits        32339    32340    +1     
  Misses       5676     5676           
  Partials      429      429           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Fixes firefox-devtools#6332.

Now we have:

* `yarn start`: production build, no service worker, port 4242
* `yarn start-prod`: production build, with service worker, port 4243
* `yarn start-dev`: development build, no service worker, port 4241

There's a bit of churn in how the filenames are determined. In the past,
we were putting a hash in the filenames whenever we were building for
production, including for the source map worker, and we didn't have a
way to "watch" the production build.

Now that `yarn start` is a "watched" production build, we need to make
sure that the source map worker filename does not contain a hash, otherwise
the path to it that gets embedded into the main bundle would get out of sync.

The main bundle still uses a hashed filename; each rebuild updates
index.html with the new path. (It's not straightforward to use a similar
mechanism for the worker, because the worker and the main bundle run in 
separate esbuild watch contexts.)

@fatadel fatadel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, LGTM!

@mstange
mstange added this pull request to the merge queue Sep 24, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Sep 24, 2026
@mstange
mstange added this pull request to the merge queue Sep 24, 2026
@mstange
mstange removed this pull request from the merge queue due to a manual request Sep 24, 2026
@mstange
mstange added this pull request to the merge queue Sep 24, 2026
Merged via the queue into firefox-devtools:main with commit fbc9d0c Sep 24, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consider making yarn start build for production

2 participants