LWC Development Guide - MCP Knowledge

Based on Real Implementation Experience: This guide combines MCP guidance with field-proven project workflows.

Overview

This guide provides:

Prerequisites

When to Use

Use This When

Core Concepts

Local Development and DX

Project Structure

Quality Gates

Patterns and Examples

Pattern 1: Feature-Folder Structure

Pattern 2: Shared Utility Modules

Edge Cases and Limitations

Q&A

Q: How should I structure a large LWC project?

A: Use feature-based folders (by domain or feature) and shared services/utils modules. Avoid dumping all components into a single flat directory.

Q: What quality gates should be enforced for LWCs?

A: At minimum: (1) Linting (ESLint/Prettier), (2) Unit tests (Jest), (3) Accessibility checks (Sa11y), and (4) Code reviews focusing on patterns from this guide.