- edited description
LWC Templates In Subfolders
Issue #1431
resolved
Template files within sub-folders of lightning web component bundles do not currently get code completion or recognize directives, components, etc. The bundle still deploys and works fine otherwise. This would only come into play when using render()
.
How to reproduce:
- Create lightning web component.
- Create sub-folder (say, a templates folder) within LWC bundle.
- Create .html file within sub-folder.
- Add
<lightning-button label="Repro"></lightning-button>
to the template such that the template reads as:
<template> <lightning-button label="Repro"></lightning-button> </template>
- Observe that directives are also not recognized.
The bundle will still deploy without issue and the new template can still be swapped to via the render method and importing the template from the sub-folder. e.g. import someTemplate from './templates/someTemplate.html';
Comments (3)
-
reporter -
reporter - edited description
-
repo owner - changed status to resolved
Issue tracker grooming. If this is still an issue, please feel free to reopen, ideally with a concrete reproduction scenario.
- Log in to comment