stencil icon indicating copy to clipboard operation
stencil copied to clipboard

Output target collection does not transpile ts path config

Open patrickhaug opened this issue 4 years ago • 3 comments

 @stencil/[email protected]>

I'm submitting a:

[x] bug report [ ] feature request [ ] support request => Please do not submit support requests here, use one of these channels: https://stencil-worldwide.herokuapp.com/ or https://forum.ionicframework.com/

Current behavior: When setting paths in tsconfig: "paths": { "@utils/*": ["./app/utils/*"] } it gets transpiled to this in output target collection. import("@utils/xxx"))

Other output targets work fine.

Expected behavior: It should resolve to the correct file path from ts config and not the alias.

patrickhaug avatar Feb 07 '21 08:02 patrickhaug

I have the same problem

abdolian avatar Feb 11 '21 08:02 abdolian

We are running into the same issue. I have provided a GitHub repo: https://github.com/liamdebeasi/stencil-alias

Steps to reproduce:

  1. Clone repo.
  2. Run npm install.
  3. Run npm run start. Observe that there are no errors.
  4. Quit the dev server.
  5. Run npm run build.
  6. Open dist/collection/components/my-component/my-component.js. Observe that the format is still being imported from @utils/utils;
  7. Open dist/components/my-component.js. Observe that the format util is correctly inlined.

liamdebeasi avatar Apr 13 '22 21:04 liamdebeasi

Thanks all! I spoke with @liamdebeasi about this issue today and confirmed its an issue. I've labeled it so that it gets ingested into our backlog

rwaskiewicz avatar May 03 '22 20:05 rwaskiewicz

A fix for this bug has been release as a part of Stencil v2.18.0. I'm going to close this issue, but please feel free to open a new issue should the bug reoccur. Thanks!

rwaskiewicz avatar Sep 12 '22 17:09 rwaskiewicz