SCSS imports from "node_modules/payload/dist" don't work for monorepos
johannesschaffer opened this issue · 1 comments
johannesschaffer commented
Problem
In monorepos the path would probably be something like ../../node_modules/...
That's only a problem with npm monorepos (and possibly yarn?) but not pnpm (since it links all dependencies to the local node_modules)
(Possible) Solutions
- ? Some tricks in SASS to resolve to multiple paths (maybe they can handle monorepos somehow) - Never used SASS before
- Add payload as a dependency (instead of peerDependency) & compile the SCSS at build time
johannesschaffer commented
Workarounds I found so far:
- pnpm
- yarn with no-hoist for payload
- npm with install-strategy = shallow => Doesn't hoist anything
- npm with install-strategy = linked => Experimental, like pnpm