callstack / callstack/linaria

Document how to use Linaria in monorepo

Open
#602 0 comments 2 reactions 0 assignees View on GitHub
cat: documentation 📖 cat: monorepo 🔱 enhancement: approved ✅ skip autolabeling
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.