AlessioGr/payload-plugin-lexical

SCSS imports from "node_modules/payload/dist" don't work for monorepos

johannesschaffer opened this issue · 1 comments

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

  1. ? Some tricks in SASS to resolve to multiple paths (maybe they can handle monorepos somehow) - Never used SASS before
  2. Add payload as a dependency (instead of peerDependency) & compile the SCSS at build time

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