ionic-team / stencil-ds-output-targets

These are output targets that can be added to Stencil for React and Angular.
https://stenciljs.com
MIT License
244 stars 108 forks source link

Angular Output Target "Cannot Find Module" On Compile #95

Open bellindj opened 3 years ago

bellindj commented 3 years ago

"@stencil/angular-output-target": "^0.0.3" "@stencil/core": "^1.16.3"

Upgrading angular-output-target from 0.0.2 to 0.0.3, the proxies.ts file now adds an import statement for each component, e.g.: import { TabsLabelComponent as ITabsLabelComponent } from '../@meridian/web/dist/types/lib/components/tabs/mds-tabs-label';

The pathing is not right for my project however, I don't want the "../" at the start of the path. Expected output would be:

import { TabsLabelComponent as ITabsLabelComponent } from '@meridian/web/dist/types/lib/components/tabs/mds-tabs-label';

On compile, I get the following error due to the pathing:

libs/angular/src/lib/directives/proxies.ts:568:59 - error TS2307: Cannot find module '../@meridian/web/dist/types/lib/components/tabs/mds-tabs-label'.

568 import { TabsLabelComponent as ITabsLabelComponent } from '../@meridian/web/dist/types/lib/components/tabs/mds-tabs-label';

Here is my stencil.config.ts blurb for the Angular output target:

angularOutputTarget({
      componentCorePackage: '@meridian/web',
      directivesProxyFile: resolve(
        __dirname,
        '../angular/src/lib/directives/proxies.ts'
      ),
      directivesUtilsFile: resolve(
        __dirname,
        '../angular/src/lib/directives/proxies-utils.ts'
      ),
      directivesArrayFile: resolve(
        __dirname,
        '../angular/src/lib/directives/proxies-list.txt'
      ),
      excludeComponents: [],
      valueAccessorConfigs: [],
    }),

Is there a way to prevent that relative pathing prefix to be added to the import?

LeonardoVizzotto commented 3 years ago

Duplicate of #86