When design package is linked in different project and the build command is triggered config file from design is not loaded. It happens because we use process.cwd() and the path refer to to that project.
/home/user/dashboard$ node ./node_modules/.bin/design build icons # process.cwd() == /home/user/dashboard
Possible solutions:
- use
__dirname: That points correctly to the design folder but since the packages are linked it may not pick up project config if both packages are on the same level:
/home/user/design <- will pick up only config from here
/home/user/dashboard
-
Explicitly load design config in build command and keep process.cwd() It may happen that config will be loaded twice therefore we should maybe handle it somehow.
-
Anything else?
When design package is linked in different project and the build command is triggered config file from design is not loaded. It happens because we use
process.cwd()and the path refer to to that project.Possible solutions:
__dirname: That points correctly to the design folder but since the packages are linked it may not pick up project config if both packages are on the same level:Explicitly load design config in build command and keep
process.cwd()It may happen that config will be loaded twice therefore we should maybe handle it somehow.Anything else?