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

dist/collection does not resolve json import path. When one Stencil distribution imports another: #5627

Closed
3 tasks done
shroffshyam opened this issue Apr 5, 2024 · 3 comments
Labels
ionitron: needs reproduction This PR or Issue does not have a reproduction case URL ionitron: stale issue This issue has not seen any activity for a long period of time

Comments

@shroffshyam
Copy link

Prerequisites

Stencil Version

2.18.1

Current Behavior

When i try to refer package.json in global-script.ts file. The import package.json file path is not resolved.


export default function(): void{
const _VERSION = version; 
}```

Then When i import this stencil library into another Stencil library
using 
```import from 'library1';```

Getting Error 

Rollup: Unresolved Import
Could not resolve './../../package.json'; from './node_module.....`


### Expected Behavior

Stencil Js config 'transformAliasedImportPathsInCollection` should handle this. 

### System Info

```shell
stenciljs 2.18.1

Steps to Reproduce

When one Stencil distribution imports another;

Code Reproduction URL

https://forum.ionicframework.com/

Additional Information

No response

@ionitron-bot ionitron-bot bot added the triage label Apr 5, 2024
@christian-bromann
Copy link
Member

@shroffshyam thanks for raising the issue.

2.18.1

Please note that we are not supporting Stencil v2 anymore. Please see our support policy.

If you can provide a reproducible example using one of the supported Stencil versions, I am happy to take a look at this.

@christian-bromann christian-bromann added ionitron: needs reproduction This PR or Issue does not have a reproduction case URL and removed triage labels Apr 7, 2024
Copy link

ionitron-bot bot commented Apr 7, 2024

Thanks for the issue! This issue has been labeled as needs reproduction. This label is added to issues that need a code reproduction.

Please reproduce this issue in an Stencil starter component library and provide a way for us to access it (GitHub repo, StackBlitz, etc). Without a reliable code reproduction, it is unlikely we will be able to resolve the issue, leading to it being closed.

If you have already provided a code snippet and are seeing this message, it is likely that the code snippet was not enough for our team to reproduce the issue.

For a guide on how to create a good reproduction, see our Contributing Guide.

@ionitron-bot ionitron-bot bot added the ionitron: stale issue This issue has not seen any activity for a long period of time label May 7, 2024
Copy link

ionitron-bot bot commented May 7, 2024

Thanks for the issue! This issue is being closed due to inactivity. If this is still an issue with the latest version of Stencil, please create a new issue and ensure the template is fully filled out.

Thank you for using Stencil!

@ionitron-bot ionitron-bot bot closed this as completed May 7, 2024
@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators May 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ionitron: needs reproduction This PR or Issue does not have a reproduction case URL ionitron: stale issue This issue has not seen any activity for a long period of time
Projects
None yet
Development

No branches or pull requests

2 participants