@lwc/babel-plugin-component
This babel plugin does the following transform:
- Global decorator transform:
- Transform
@api
decorator topublicProperties
andpublicMethods
static properties. - Transform
@wire
decorator towire
static property. - Transform
@track
decorator totrack
static property.
- Transform
- LWC component class sugar syntax:
- Check for misspelled lifecycle hooks.
- Import and inject
render
from a collocated template if a component class doesn't already implement arender
method.
- Optimization:
- If the compiler inject the default template a component, it will also wire the template style to the component.