-
During the development process, it can be convenient to keep the directory with common node_modules outside the project directory, a level or two higher. But the wmr cannot import files from it. Is this a bug or a feature? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This is an oversight that we've been slowly working towards solving. In WMR 2, we moved the cache directory out of There are a few workarounds in the meantime:
|
Beta Was this translation helpful? Give feedback.
This is an oversight that we've been slowly working towards solving. In WMR 2, we moved the cache directory out of
node_modules
to allow for outside-of-CWD caching. Marvin also recently landed support for aliasing things from outside/above the current working directory, but we don't yet donode_modules
resolution that takes this into account. The last step is a fairly major rearchitecture of how we do streaming npm install, which includes using Node's built-in module resolution (which supports nested node_modules directories).There are a few workarounds in the meantime:
if this is a monorepo and you're using
yarn
, you can mark the packages you want to reference from wmr asnohoist
in t…