Bun CSS Modules ReferenceError with HMR Enabled on Windows
Is it fixed? Not yet.
Ongoing since Nov 13, 04:27 UTC. First reported Nov 13, 04:27 UTC.
What happened
Using CSS Modules with HMR enabled on Windows in Bun causes a ReferenceError stating that import_Button_module is not defined. Developers on Windows attempting to use hot module reloading with CSS modules are affected.
What caused it?
Under active investigation. No report has identified a root cause yet.
No verified workaround yet
None of the linked reports describe a mitigation. This page updates when one appears.
Timeline
- Investigating(current)
- Workaround available(upcoming)
- Resolved(upcoming)
- First report on GitHub issue
CSS Modules cause ReferenceError: import_Button_module is not defined with HMR enabled on Windows
Source
Evidence
1 report · 1 GitHubShow
- [1]GitHub First reportCSS Modules cause ReferenceError: import_Button_module is not defined with HMR enabled on Windows(opens GitHub issue in a new tab)
What version of Bun is running? 1.4.4+38afee6c8 What platform is your computer? Microsoft Windows NT 10.0.19045.0 x64 What steps can reproduce the bug? Create the following files: src/index.ts import { serve } from "bun"; import index from "./index.html"; serve({ routes: { "/*": index, }, development: { hmr: true, console: true, }, }); src/index.html <!doctype html> <html lang="en"> <head> <meta charset="UTF-8" /> <title>Bun CSS Modules Test</title> </head> <body> <div id="root"></div> <script…
by cesarguerrero07777-netizen 0upvotes 1comments
FAQ
What happened in the Bun issue?
Using CSS Modules with HMR enabled on Windows in Bun causes a ReferenceError stating that import_Button_module is not defined. Developers on Windows attempting to use hot module reloading with CSS modules are affected.
What is affected by the Bun issue?
Bun (versions: 1.4.4+38afee6c8).
When did the Bun issue start and end?
It started Nov 13, 04:27 UTC and is still ongoing (6 d so far). This page updates as it develops.
How do I get alerts for Bun?
Subscribe to the Bun RSS feed for every new Bun incident, or connect an AI assistant to WhatBrokeToday over MCP and ask whether Bun is down. Bun feed
Where does this information come from?
WhatBrokeToday collects public status pages, developer community reports and security advisories, groups the ones about the same problem, and links every report under Evidence on this page. This one has 1 report from 1 independent source.