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...

2
  • 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
    Commented Nov 5, 2019 at 22:57
  • @zaitsman did you see the answer below... Commented Nov 6, 2019 at 4:16

2 Answers 2

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

1
  • 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. Commented Nov 5, 2019 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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .