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
How to reproduce:
- Create lightning web component.
- Create sub-folder (say, a templates folder) within LWC bundle.
- Create .html file within sub-folder.
<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';