import mdx file sebagai component
#react
#mdx
Import the mdx file in the component, the way is similar to normal component import:
import Contents from '@/mdx/Contents.mdx';
// Usage
<Contents />
Turns out it's in the documentation. Get used to reading first, guys, don't be like me.
:not() pseudo-class
#css
#selector
This :not()
package is quite tricky, the wrong use can also result in not as expected.
For example, inline styling code
which is not children of pre
or .code-block
. Its use:
Don't
:not(pre), :not(.code-block) {
> code {
background-color: 'red';
}
}
Do
:not(pre, .code-block) {
> code {
background-color: 'red';
}
}
Turborepo dependsOn
#turborepo
#monorepo
"build": {
"dependsOn": ["^lint", "test"]
},
dependsOn
with ^ indicates a task from another package, while the one without ^ is a task from the package itself.
For example: when app A wants to build, it must run tasks lint
in all its package dependencies, and it must also run task test
app A itself.