Shared directory for all workspaces
- Dominant language
- JavaScript
- Stars
- 2.4k
- Forks
- 97
- PR merge metrics
- No merged PRs in 30d
Description
We use approximately the following directory structure in the project. And each workspace has a react-create-app.
```
"bolt": {
"workspaces": [
"packages/*"
]
}
```
```
project
└───packages
│ cabinet
│ landing
```
During the development process, a lot of code appears that is the same in all workspaces (for example, utils, api, constants). So I want to put the code at the top level and reuse it.
```
project
│ shared
│ │ utils
│ │ constants
│ │ apis
│
└───packages
│ cabinet
│ landing
```
I haven't found a working way to import shared code inside packages/{name} yet. Can someone share working solutions?
Thank you!!
Contributor guide
Research direction
The issue describes a top-level shared directory alongside packages/{name}, but names no repository files or tests. Start by reviewing how Bolt discovers workspaces and resolves package imports, then reproduce the shown project structure. Done means establishing and documenting a working shared-code solution, with validation for the example layout.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100