I just gonna let that here because, at least for me now, the way to import the component built with Stencil into Ionic was a bit different
First there is a description of what to do with angular on the official StencilJS website https://stenciljs.com/docs/framework-integration
What I did in case of Ionic (after having build and installed the component, named “my-component” in my case):
-
Like describe above, the
CUSTOM_ELEMENTS_SCHEMA
need to be declared -
In
app.modulte.ts
an import should be added, likeimport 'my-component/dist/mycomponent';
-
The component lib installed under node_modules not gonna be included in the vendor.js file. Therefor it need to be copied. To do so, I have overwritten
copy.config.js
fromapp-scripts
and add a thecopyMyComponent
block like followingcopyMyComponent: { src: ['{{ROOT}}/node_modules/my-component/dist/mycomponent**/*'], dest: '{{BUILD}}' }
UPDATE
@AaronSterling describe nicely, in his component’s README, all the steps needed to include a component in an Ionic project https://forum.ionicframework.com/t/stencil-importing-stencil-components-into-ionic-angular/