Unlock Instant Salesforce Lightning Web Component Previews: Develop Faster, Debug Smarter
244 views
May 15, 2025
We can preview Salesforce Lightning Web Component locally without saving/deploying the changes to the server. Blog Post: https://www.infallibletechie.com/2025/05/unlock-instant-salesforce-lightning-web-component-previews-develop-faster-debug-smarter.html
View Video Transcript
0:06
hello everyone in this video we are
0:09
going to see how to do local development
0:13
for Salesforce lightning web component
0:17
in order
0:18
to test the changes we are making to
0:22
Salesforce lightning web component we
0:24
have to deploy the lightning web
0:26
component so that we will be able to
0:30
view the changes that has been done
0:34
but but we can preview the changes
0:39
locally with the help
0:41
of
0:43
Salesforce Lightning Dev or local dev
0:46
plug-in
0:49
in this video we are going to see how to
0:51
do the setup and also how to preview the
0:55
Lightning web component changes that are
0:58
saved locally on our PC instead of
1:00
deploying it to the Salesforce server
1:04
the first step is run this
1:07
command in your VS
1:09
code open the terminal and then run this
1:13
uh SF update so that the CLA version
1:17
will be updated to the latest version
1:20
once this is done run this command or
1:25
this command so that the lightning dev
1:29
the local dev plug-in will be installed
1:32
in your VS code or in your CLI so run
1:35
this uh command the first one or the
1:38
second one so that the plug-in is
1:40
installed
1:41
next go to local div in Salesforce setup
1:46
and toggle on enable local div so we
1:50
have to go and search for local
1:54
div and then this uh enable local div
1:57
should be toggled on make sure these
2:00
things are done
2:03
the next step is we have to run this
2:07
command so that we can see the changes
2:10
or preview the changes that are saved
2:13
locally let's uh see that in action so
2:18
I'm going
2:19
to run this
2:22
command it is asking whether I wanted to
2:25
test it from desktop version of it
2:28
mobile Android version or mobile iOS
2:30
version so you can choose um desktop
2:34
mobile Android or mobile iOS by using
2:37
the down arrow button and up arrow
2:39
button you should be able to select your
2:42
choice i'm going to select desktop so
2:45
press enter it is listing all the
2:49
lightning applications that are
2:50
available in my Salesforce or so so
2:53
using down arrow I'm going to
2:56
select service console press enter
3:02
so now this is opening it in my preview
3:07
so
3:08
now let's test the local
3:12
changes so in order to test it so as of
3:17
now I'm making use of a lightning web
3:20
component here and then it is showing
3:21
send message so this is the message I
3:24
can see if I remove this send and then
3:27
if I type demo as of now I haven't saved
3:31
it if I use local save I I'm able to see
3:35
the changes
3:39
here so again I'm not right clicking and
3:43
deploying it to the org i'm
3:48
just using save so it got saved and I'm
3:53
able to see the changes
3:55
so if you wanted to first check the look
3:59
and feel of the lightning web component
4:02
changes locally in your uh PC then you
4:05
can make use of this local
4:12
div please check the video description
4:14
in the video description I have shared
4:16
my blog post from the blog post you
4:19
should be able to get all the commands
4:21
which we discussed in this video for
4:23
your
4:30
reference i hope it was
4:37
helpful thank you for watching
#Internet Software