You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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?
The text was updated successfully, but these errors were encountered:
As i see, you have issue #81 and i agree that this feature must be implemented ASAP, because it's not so friendly when i have to keep in my mind a directory from where will resolve relative paths for my theme. It's not my deal and current implementation is not allow to make really complicated design systems.
It's good to solve both problems with one approach to handle paths.
We have to introduce a convention to handle filepaths.
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?The text was updated successfully, but these errors were encountered: