salesforcecli / plugin-lightning-dev

Local development tools for LEX, Mobile, and Experience Sites
BSD 3-Clause "New" or "Revised" License
5 stars 7 forks source link

Plugin only works when Lightning Web Security is enabled; this requirement is undocumented #213

Open jclark-dot-org opened 3 days ago

jclark-dot-org commented 3 days ago

Summary

While running a dev sever with sf lightning dev app, the server starts and the page loads in my browser, but edits to local LWC html files are not reflected in the running page, UNLESS the org has Lightning Web Security enabled. This may simply be a documentation issue, as I could not find this requirement documented.

Steps To Reproduce:

  1. Turn off LWS in your target org.
  2. Run the dev server.
  3. Make edits to an LWC

Expected Result

Changes are immediately visible.

Actual Result

Changes are never observed in the running page.

Additional Information

I originally reported this on the CLI repo as https://github.com/forcedotcom/cli/issues/3076. @mmablom responded with the idea to check LWS, which did fix my issue.

SF CLI:

using zsh on Mac OS 14.6.1

{
  "architecture": "darwin-arm64",
  "cliVersion": "@salesforce/cli/2.62.6",
  "nodeVersion": "node-v20.17.0",
  "osVersion": "Darwin 23.6.0",
  "rootPath": "/Users/jclark/.nvm/versions/node/v20.17.0/lib/node_modules/@salesforce/cli",
  "shell": "zsh",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 3.2.5 (core)",
    "@oclif/plugin-commands 4.1.3 (core)",
    "@oclif/plugin-help 6.2.14 (core)",
    "@oclif/plugin-not-found 3.2.22 (core)",
    "@oclif/plugin-plugins 5.4.14 (core)",
    "@oclif/plugin-search 1.2.11 (core)",
    "@oclif/plugin-update 4.6.3 (core)",
    "@oclif/plugin-version 2.2.14 (core)",
    "@oclif/plugin-warn-if-update-available 3.1.18 (core)",
    "@oclif/plugin-which 3.2.15 (core)",
    "@salesforce/cli 2.62.6 (core)",
    "apex 3.5.1 (core)",
    "api 1.3.1 (core)",
    "auth 3.6.65 (core)",
    "data 3.7.0 (core)",
    "deploy-retrieve 3.12.17 (core)",
    "info 3.4.9 (core)",
    "lightning-dev 1.9.0 (user) published 10 days ago (Fri Oct 11 2024)",
    "limits 3.3.32 (core)",
    "marketplace 1.2.26 (core)",
    "org 4.6.0 (core)",
    "packaging 2.8.11 (core)",
    "schema 3.3.34 (core)",
    "settings 2.3.23 (core)",
    "sobject 1.4.41 (core)",
    "source 3.5.21 (core)",
    "telemetry 3.6.15 (core)",
    "templates 56.3.22 (core)",
    "trust 3.7.33 (core)",
    "user 3.5.32 (core)"
  ]
}
ravijayaramappa commented 3 days ago

We have fixed this issue in the upcoming Spring 25 release. Filed a WI(W-17043223) to backport the fix in Winter 25 release.