2

I am developing LWC components and I am growing tired of refreshing the page twice to get the new code to load. Workflow is: in VS Code, make changes, save locally, deploy source to org, reload test page, reload test page and finally see if my changes were effective.

I have been using the beta Local Development Server for LWC, but it is definitely still a beta. It is helpful for some changes, but often I need to see the components in the actual org to develop effectively.

Does anyone have any suggestions to reduce the need to reload pages with LWC components twice? Would save me some serious time...

  • Oh i am so much in the same boat... but so far all i did was perfect my skills of pressing CMD+R in my browser... – zaitsman Nov 5 '19 at 22:57
  • @zaitsman did you see the answer below... – Kurt Fairfield Nov 6 '19 at 4:16
5

While doing development I strongly suggest using the following technique to disable browser caching. You will not need the second refresh anymore once this is unchecked: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/debug_disable_caching.htm

| improve this answer | |
  • Thanks Glen, I skipped Aura and went straight to LWC, nothing about cache disable in the LWC dev guide, work in progress I guess. Saves a bunch of clicks and waiting. – Kurt Fairfield Nov 5 '19 at 23:30
0

Apart from the above answer, enabling Debug mode for your current user also helps, as you skip the framework optimizing, minimizing and caching your js code. https://help.salesforce.com/articleView?id=aura_debug_mode.htm&type=5

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.