Firefox 153 added Local Mode to DevTools: it maps a folder on your disk to an https:// origin. You don't run npx serve or python -m http.server , and you don't touch mkcert. Open DevTools, point it at a folder, and https://shop.localhost/index.html loads straight from ~/code/shop .
The official docs pitch it in one line: "This prevents having to spawn a HTTP server to test a web page." I spent a while trying to poke holes in it. My take is that the docs oversell the HTTPS part, which localhost already gave you, and undersell per-project origins, which fix something that annoys me every day. Below is the setup, plus the limits that will send you back to Vite.
What Firefox Local Mode actually does
You register mappings. Each one has two fields:
Origin : a hostname Firefox serves over https:// , e.g. firefox.localhost
Local folder : the directory the files come from, e.g.…