1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
1,安装插件 sf plugins install @salesforce/plugin-lightning-dev 2,新建工程 sf project generate --name lwc-local-dev cd lwc-local-dev 3,新建lwc组件 sf lightning component generate --type lwc --name helloWorld --output-dir force-app/main/default/lwc 4,本地运行 sf lightning dev component --name helloWorld -b chrome --target-org lwc-local-dev 注意事项 从 2025 年夏季开始,Local Dev 对单个组件预览的支持处于测试阶段。 |