Setup
Prerequisites
To follow this guide, it is expected you have node
, pnpm
and sfdx
installed as well as a SFDX Project setup with a valid lwc.config.json
file.
-
Install the package
Run the following command in your terminal from the root of your SFDX Project to install LWC Garden:
-
Create a
garden.config.js
fileThis is the bare minimum configuration required to get LWC Garden working. This imports your module configuration from your existing
lwc.config.json
file.Don’t forget to add the
garden
config to yourlwr.config.json
file: -
Run the local dev server
When working locally, the development server lets you preview your work and automatically refreshes your browser when you make changes.
Run the following from the root of your SFDX Project:
This will log a message to your terminal with the URL of your local preview. Open this URL to start browsing your LWCs.