-
Notifications
You must be signed in to change notification settings - Fork 825
Description
Prerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already report this problem, without success.
Stencil Version
4.20
Current Behavior
I followed this documentationt to build a monorepo with stencil and angular : https://stenciljs.com/docs/angular
Nothing less, nothing more.
When running my angular app I can see in the network tab in my console that my two stencil components are loaded whereas I only need one.

In my app.component.ts (angular 18.2 in standalone mode) I call only "my-component" but my two components are called in the console.
import { Component } from '@angular/core';
import { RouterOutlet } from '@angular/router';
import { MyComponent } from 'component-library';
@Component({
selector: 'app-root',
standalone: true,
imports: [RouterOutlet, MyComponent],
templateUrl: './app.component.html',
styleUrl: './app.component.scss'
})
export class AppComponent {
title = 'my-app';
}
Expected Behavior
I would like to load only the right component, not everything at once.
System Info
System: node 20.15.1
Platform: windows (10.0.19045)
CPU Model: 11th Gen Intel(R) Core(TM) i5-11600K @ 3.90GHz (12 cpus)
Compiler: [HIDDEN]\@stencil\core\compiler\stencil.js
Build: 1722623140
Stencil: 4.20.0
TypeScript: 5.5.3
Rollup: 2.56.3
Parse5: 7.1.2
jQuery: 4.0.0-pre
Terser: 5.31.1Steps to Reproduce
git clone https://github.com/Loic57/stencil-angular-18
npm i (be sure to have lerna installed)
go to packages/stencil-library and run : npm run build
go to packages/angular-workspace and run : npx -p @angular/cli ng build component-library
go to packages/angular-workspace/projects/my-app and run : npm run start
The browser should open on localhost:4200 and you should see "Hell, i'm a test" which is shipped by default with stencil.
But if you inspect the network tab in the console you should see another component name created by myself but which is not called in app.component.ts
Code Reproduction URL
https://github.com/Loic57/stencil-angular-18
Additional Information
No response