Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Angular Output 'scam' proxies import type 'Component' path #406

Open
3 tasks done
maldago opened this issue Dec 8, 2023 · 1 comment
Open
3 tasks done

bug: Angular Output 'scam' proxies import type 'Component' path #406

maldago opened this issue Dec 8, 2023 · 1 comment
Labels

Comments

@maldago
Copy link

maldago commented Dec 8, 2023

Prerequisites

Stencil Version

4.7.2

Stencil Framework Output Target

Angular

Stencil Framework Output Target Version

0.8.3

Current Behavior

Using dist-custom-elements, with the option auto-define-custom-elements', targeting the output type 'scam'forangularOutputTarget`;

The generated proxies.ts module contains an import type { Components } from ... but the path that is generated has no exported member. The paths to the component.js files are correct.

Expected Behavior

Expect the path to resolve the type.

Steps to Reproduce

  • fork the code reproduction

  • yarn

  • nx run reprowebcomps:build

  • observe the output proxies.ts @ libs/ng-repro/src/directives/proxies.ts

  • if you need to rerun the build step, clear the nx cache with nx reset

Code Reproduction URL

https://github.com/maldago/stencil-angular-output-target

Additional Information

No response

@ionitron-bot ionitron-bot bot added the triage label Dec 8, 2023
@sean-perkins
Copy link
Collaborator

Hello @maldago, thanks for this issue.

The angular output target currently only supports the default configuration for customElementsExportBehavior. When the Angular component wrappers are constructed, they will automatically define the custom element.

Using customElementsExportBehavior: "auto-define-custom-elements" is not a configuration we planned for and I don't believe it makes sense when aligned to how Angular components are defined. For example it could define the custom element for a child web component that you have an Angular wrapper for, but the Angular component may never be imported/defined. This leads to confusion and potential bugs in your application, since the web component may render correctly, but angular bindings will not work as expected on that element.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants