-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Docs: Theming instructions should work with Yarn Workspaces #3674
Comments
👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you've completed all the fields in the issue template so we can best help. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can. |
Yarn Workspaces and actually monorepo setup are exclusions for a common use case and I am not sure that we should cover it in regular docs 🤔 |
To fix this, you could use the nohoist property of yarn workspaces, which keeps the package in the relevant child project's For example, this is the workspaces part of my updated root "workspaces": {
"packages": ["my-app"],
"nohoist": ["my-app/fomantic-ui-less"]
} (use "**/fomantic-ui-less" if you need it to work in every package) Then delete your @layershifter It would be great if we could get at least a small note in the docs for this case to save users debugging time, especially seeing as workspaces has been out for a while now and use of monorepos seems to be on the rise. |
Found out you don't need to |
Closing this issue for now. Technically CRA is still not supported in a monorepo configuration. It is possible... I do this in a number of monorepo projects... but it requires a lot of understanding of the build pipeline. And since it is not supported by CRA, these configurations could break at any time. |
Steps
I have followed the instructions to set up theming with Create React App. My app is set up using the following structure using Yarn Workspaces:
| app
--| node_modules
--| packages
----| web
------| semantic-ui
------| craco.config.js
Expected Result
Theme variables and overrides should work the way they do when not using Yarn Workspaces.
Actual Result
semantic-ui-less in the Workspace root folder does not read the theme overrides set in the web folder. It does work if I copy the semantic-ui-less folder from app/node_modules and paste into app/packages/web/node_modules. However, this folder is deleted whenever I run yarn install.
Version
"semantic-ui-less": "^2.4.1"
The text was updated successfully, but these errors were encountered: