Description
Summary
I have a lightning web component and use sf lightning dev as local dev server.
I split the js code of the web component into multiple files are try to organize them in folders
when I do this, the dev server starts but gets a 'change detected' signal about each second
The lighting compiler that is used when 'deploy'ing and the one producing the code works as expected
Steps To Reproduce:
- Create an lwc
- factor out code from the main js file , move it into a subfolder and import it from there
- start the dev server and look at the console output
Expected Result
The component should be loaded from backend, then one-time replaced by the local code and displayed
Actual Result
the component loads form the backend, but then a reload cycle of the local code occurs around each second
Additional Information
Screenshots:
see above
Logs:
see screenshot. I could produce debug logs if needed. Would be nice to know how to set DEBUG to a value other than '*' to limit the output to the really necessary (e.g. excluding babel output)
System Information
SF CLI:
sf lightning dev component --name sample
sf --version
@salesforce/cli/2.109.6 win32-x64 node-v22.19.0
sf plugins
code-analyzer 5.5.0
lightning-dev 4.5.2
Uninstalled JIT Plugins:
community 3.3.41
custom-metadata 3.3.68
dev 2.5.1
devops-center 1.2.27
flow 1.0.2
signups 2.6.49
@salesforce/sfdx-plugin-lwc-test 1.2.1OS:
Windows
Activity
ElementalLogic commentedon Dec 8, 2025
Interestingly, this issue has been killing me, but does affect my colleagues machine. No discernable configuration differences..
If anyone has any ideas, I'd be happy to try them, currently it's making lwc so painful.
ElementalLogic commentedon Feb 26, 2026
2 Months on this is still a significant issue. Do we have any idea if a fix is scheduled or of any workarounds.
Rightnow, my workaround for this is to use Rollup as part of debug process to flatten the folder structure before deployment... BUT it's beyond complicated and not something we'd be able to maintain longterm.
mzimdars-service1-com commentedon Feb 26, 2026
not even sure this repo is monitored 😢
git2gus commentedon Feb 26, 2026
This issue has been linked to a new work item: W-21368551