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

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

Open
bellindj opened this issue Jul 17, 2020 · 1 comment
Open

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

bellindj opened this issue Jul 17, 2020 · 1 comment
Labels

Comments

@bellindj
Copy link

"@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
Copy link

LeonardoVizzotto commented Jul 17, 2020

Duplicate of #86

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

3 participants