Closed jeffhube closed 4 years ago
I used Process Monitor to watch for file changes, and it appears that this may be caused by the Lightning Web Components extension (salesforce.salesforcedx-vscode-lwc). As I type in a Lightning Web Component's js file, this extension will write to force-app\main\default\lwc\jsconfig.json
over and over again, which is probably detected by the dev server, triggering a reload.
Good catch. Bugging it.
Created two bugs for this.
W-6860946 - Stop saving jsconfig.json so much W-6860931 - Updates to jsconfig.json cause preview to reload.
Same happens to me in Windows 10 but without even typing in vs code. Sometimes I type in an input in chrome from the component I'm trying and it gets refreshed, very frustrating to try out the component. It's also due to jsconfig.json being modified, but I don't know what triggers it.
Fixes are in progress for this one, and also for the vscode plugin writing too often itself.
This has been fixed. You can get the update with sfdx plugins:update
.
Describe the bug Whenever I type a character in my component's js file, the dev server will recompile and reload the component in the browser. This makes typing really laggy. It is also completely pointless because it keeps reloading the unchanged file from the disk. Once I save the file it will reload with the changes as expected. The component does not refresh everytime I type a character in the css file, it only happens with the js file.
To Reproduce
Expected behavior The component should not be reloaded until you save changes. A clear and concise description of what you expected to happen.
Desktop (please complete the following information):