Thursday, May 14, 2020

SFDX Plugin @salesforce/lwc-dev-server

@salesforce/lwc-dev-server


Getting Started

You will need to have the Salesforce DX CLI installed.
Run the following command to verify CLI installation.
sfdx

Run the following command to install the lwc-dev-server plugin
sfdx plugins:install @salesforce/lwc-dev-server


Navigate to a project directory that contains a Lightning Web Component and run the following to start the local dev server
cd mySFDXProjectWithManifest
sfdx force:lightning:lwc:start


If successful should see the following:

Starting LWC Local Development.
    Dev Hub Org: nick@cirruscode.com
    Scratch Org: nick@cirruscode.com
    Api Version: 48.0
Template version key 8ef8ca85d9
[HPM] Proxy created: /  ->  https://nickforcedev-dev-ed.my.salesforce.com
[HPM] Subscribed to http-proxy events:  [ 'proxyReq', 'error', 'close' ]
Server up on http://localhost:3333


Navigate to http://localhost:3333/



SFDX commands are also available from VSCode to manage the local development server




No comments:

Post a Comment