A toolchain for building scalable, enterprise-ready component systems on top of TypeScript and Web Component standards. Stencil components can be distributed natively to React, Angular, Vue, and traditional web developers from a single, framework-agnostic codebase.
Long story short : My stencil.config.ts is configured with outputTarget: 'standalone' and when I'm trying to use these wrapped components into angular I have many error messages, for example this one in angular-workspace/projects/components-library/src/lib/stencil-generated/components.ts :
"import { defineCustomElement as defineComponentName } from 'LIBRARY_EXAMPLE_NAME/components/component-name.js';
Another one in angular-workspace/projects/components-library/src/lib/post-web-components-angular.module.ts :
"STENCIL_FOLDER_EXAMPLE/loader/index.d.ts" is not a module - when I hover the line
import {defineCustomElements} from STENCIL_COMPONENTS/loader';
Expected Behavior
Be able to use stencil standalone components into angular 16 / 17 / 18
npm i (you need lerna 8.0.2 to install the dependances of all projects)
Go to angular-workspace/projects/my-app/src/app/app.component.ts, this is where I import my wrapped angular 17 components
don't forget to run : npx -p @angular/cli ng build component-library to build the wrapped components lib
ng serve to start the app and you should see "test" and that's it. If you inspect the markup with your console you'll see two components: and . These two components are empty so they don't display on screen
Prerequisites
Stencil Version
4.16
Current Behavior
This ticket is a duplicate of : https://github.com/ionic-team/stencil/issues/5118
I would like to reopen this ticket because my issue has not been solved and I need a solution
In angular 16.2 and 17 I tried to use standalone mode with stencil but It doesn't work.
I followed this doc : https://stenciljs.com/docs/angular#angular-with-standalone-components but it doesn't work
You can see a reproduction repo here : https://github.com/Loic57/stencil-angular17
Long story short : My stencil.config.ts is configured with outputTarget: 'standalone' and when I'm trying to use these wrapped components into angular I have many error messages, for example this one in angular-workspace/projects/components-library/src/lib/stencil-generated/components.ts :
"import { defineCustomElement as defineComponentName } from 'LIBRARY_EXAMPLE_NAME/components/component-name.js';
Another one in angular-workspace/projects/components-library/src/lib/post-web-components-angular.module.ts :
"STENCIL_FOLDER_EXAMPLE/loader/index.d.ts" is not a module - when I hover the line
import {defineCustomElements} from STENCIL_COMPONENTS/loader';
Expected Behavior
Be able to use stencil standalone components into angular 16 / 17 / 18
System Info
Steps to Reproduce
Code Reproduction URL
https://github.com/Loic57/stencil-angular17
Additional Information
No response