Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
johannesschaffer opened this issue Apr 5, 2023 · 1 comment

Comments

@johannesschaffer
Copy link

johannesschaffer commented Apr 5, 2023

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
@johannesschaffer
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant