forcedotcom / lwc-dev-server-feedback

LWC Local Development
BSD 3-Clause "New" or "Revised" License
45 stars 10 forks source link

Unable to use new directives lwc:if, lwc:elseif, lwc:else #149

Open jefersonchaves opened 1 year ago

jefersonchaves commented 1 year ago

Describe the bug Local development tool fails to load components using the new lwc:if, lwc:elseif, or lwc:else to Render DOM Elements Conditionally. Error: Invalid directive "$lwc:if" on element <template>..

To Reproduce Steps to reproduce the behavior:

  1. Create a component simple as:
    <template>
    <template lwc:if={_isLoading}>Loading</template>
    <template lwc:else>
        Display data loaded
    </template> 
    </template>
  2. Save.

Expected behavior The conditional display of elements as if it was deployed to Salesforce.

Screenshots image

Desktop (please complete the following information):

Additional context The browser is irrelevant.

jsmithdev commented 1 year ago

Updated sfdx and plugins but same issue. Hopefully we can start using new directives over if:true etc soon :crossed_fingers:

Error: LWRPLUGIN_ERROR: Invalid directive "$lwc:if" on element <template>.

Plug in version: @salesforce/lwc-dev-server 2.11.0

SFDX version: sfdx-cli/7.192.2 linux-x64 node-v18.14.1

stale[bot] commented 1 year ago

This issue has been automatically marked as type:bug-p3 because it has not had recent activity.

RaviVaranasi commented 1 year ago

Are there any plans on supporting this for local dev server development?

stale[bot] commented 1 year ago

This issue has been automatically marked as type:bug-p3 because it has not had recent activity.

petter-eikeland commented 1 year ago

It would be really good if this plugin could be maintained. It has great potential to dramatically increase Developer Productivity!