I’ve installed both packages:
Stencil/Core
Stencil/Webpack
Then, set webpack.config.js:
const stencil = require('@stencil/webpack');
...
plugins: [
new stencil.StencilPlugin()
]
Finally I’ve created a src/components directory in the assets folder and create a component.tsx:
import { Component, Prop, h } from '@stencil/core';
@Component({
tag: 'my-first-component',
})
export class MyComponent {
// Indicate that name should be a public property on the component
@Prop() name: string;
render() {
return (
<p>
My name is {this.name}
</p>
);
}
}
When trying to use the component it doesn’t render at all. Am i missing some config somewhere for the compiler?