Skip to content

Implement resolving path relative package, but not path in file system #131

@vitonsky

Description

@vitonsky

Proposal

Implement resolving path relative package, but not path in file system.

For example your convention may assume that all paths start from #, node_modules or other symbol will resolve with packages manager, but will not be a fs paths.

Use case

I have theme file in my project https://github.com/translate-tools/linguist/blob/master/src/themes/default.theme.json

I want to start use pnpm which keep node_modules not in project directory. But theme file is use relative paths in file system to some file in node_modules. I need a way to specify something like #react-elegant-ui/theme/tokens/light-color.tokens.yml instead of ./node_modules/react-elegant-ui/theme/tokens/light-color.tokens.yml because relative path will not work.

Maybe i could use .js config and resolve paths with require? If yes, then how i can do it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions