bug: 'Namespace components.Components' has no exported member 'IonAccordion' #385
Labels
help wanted
a good issue for the community
package: angular
@stencil/angular-output-target package
type: bug
Something isn't working
Prerequisites
Stencil Version
3.4.2 and 4.2.0
Stencil Framework Output Target
Angular
Stencil Framework Output Target Version
0.8.1
Current Behavior
Building a custom-component which uses @ionic/core to render some components:
namespace: 'CustomComonentNs'
but anyway thecomponents.d.ts
generates:If this is fixed, @stencil/angular-output-target should also import and generate components.ts from corrected namespace.
stencil-library
only usesion-content
inmy-component
(see https://github.com/miqmago/custom-library-ng-bug/blob/master/stencil-library/src/components/my-component/my-component.tsx#L30) but the generatedangular-workspace/projects/component-library/src/lib/stencil-generated/component.ts
contains:Components
from components.d.ts, but as stated in Angular lib doesn't compile when ionicons dependency is added to Stencil lib #232, we should declare all the components ininterface.d.ts
. This is quite difficult considering thatcomponents.ts
includes all the components from@ionic/core
, so it makes really difficult to maintain. Would be easier if output-target generator would exclude unused components. Anyway I imagine that the problem is with any external library or web component that would define it's custom-elements, they should be re-exported as described by @sean-perkins in mentioned issue.If the step 3 is not done, angular library will not compile, complaining about:
Expected Behavior
CustomComonentNs
stencil-library
should be exported@ionic/core
,ionicons
, ...) without having to manually import and re-export them.Right now the solution I've found is to manually rename the namespace,
import { Components as IonComponents } from '@ionic/core';
and replace Components byCustomComponentsNs
andIonComponents
, but this is done manually and it's very error prone.Steps to Reproduce
Follow all the steps in https://stenciljs.com/docs/angular
In
custom-component
install@ionic/core
and use it in some component.Compile the
custom-component
to angular target.Code Reproduction URL
https://github.com/miqmago/custom-library-ng-bug
Additional Information
No response
The text was updated successfully, but these errors were encountered: