Document how to use Linaria in monorepo
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 413
- PR merge metrics
- No merged PRs in 30d
Description
## Describe the enhancement
It would be good to have a guide on what additional steps has to be made to make Linaria work in monorepo environment
## Motivation
There are some issues related to monorepo
## Possible implementations
We can use [this](https://github.com/mikestopcontinues/lerna-next-linaria) repo to build the guide
The important parts are `babel` `rootMode: "upward"` and removing monorepo packages that contain Linaria code from ignored with regex negative lookahead
```
'linaria/babel', {
evaluate: true,
displayName: true,
sourceMap: true,
ignore: /node_modules\/(?!@mono)/,
babelOptions: {
rootMode: 'upward',
},
},
```
Here is a comment with raw webpack config https://github.com/callstack/linaria/issues/334#issuecomment-469725071
Contributor guide
Assessment
This issue has not been assessed yet.