Local First Development
Build the way front end developers should, local first.
Local First Development
Build the way front end developers should, local first.
Slot Placeholders
Pre-fill <slot /> elements during development.
API Editor
Configure your @api properties and test locally using argTypes.
Mock Anything
Apex methods, AppExchange Packages or any On-Platform imports.
On Platform or Open Source
Works with on-platform folder structures or standard open source folder structures.
Local Module Resolution
Dynamically resolve Static Resources, Custom Labels and lightning/* imports.
Install LWC Garden:
pnpm add @lwc-garden/core tsxOptionally with @lwc-garden/utils
pnpm add @lwc-garden/core @lwc-garden/utils tsxnpm install @lwc-garden/core tsxOptionally with @lwc-garden/utils
npm install @lwc-garden/core @lwc-garden/utils tsxyarn add @lwc-garden/core tsxOptionally with @lwc-garden/utils
yarn add @lwc-garden/core @lwc-garden/utils tsxCreate a garden.config.ts file
import { GardenConfig } from '@lwc-garden/core/types'import lwrConfig from './lwr.config.json' with { type: 'json' }
export default { // lwc.config.json modules type modules: [...lwrConfig.lwc.modules],} satisfies GardenConfigDon’t forget to add the
gardenconfig to yourlwr.config.jsonfile:lwr.config.json {"lwc": {"modules": [{"dir": "./.garden/components","namespace": "garden"},{"dir": "./force-app/main/default/lwc","namespace": "c"}]},"moduleProviders": ["@lwrjs/label-module-provider","@lwrjs/app-service/moduleProvider","@lukethacoder/lwrjs-lwc-module-provider","@lwrjs/npm-module-provider"],"routes": [{"id": "app","path": "/","rootComponent": "garden/app","layoutTemplate": "./.garden/layouts/index.html","bootstrap": {"syntheticShadow": true}}]}
Run the local dev server
npx @lwc-garden/core dev