Docusaurus Integration #2723
-
Has anyone tryied to use PandaCSS with Docusaurus? The layers are loaded, but the styles aren't getting applied. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I created this sandbox just for you. Feel free to check it out: https://github.com/chakra-ui/panda/tree/main/sandbox/docusaurus-ts I will probably add it to the docs, but here are the general steps:
// ...
import pandaCss from '@pandacss/dev/postcss'
const config: Config = {
plugins: [
function () {
return {
name: 'docusaurus-plugin',
configurePostCss(postcssOptions) {
postcssOptions.plugins.push(pandaCss())
return postcssOptions
},
}
},
],
/// ...
}
|
Beta Was this translation helpful? Give feedback.
I created this sandbox just for you. Feel free to check it out: https://github.com/chakra-ui/panda/tree/main/sandbox/docusaurus-ts
I will probably add it to the docs, but here are the general steps:
Install docusaurus using their CLI:
npx create-docusaurus@latest my-website classic
Install Panda CSS
pnpm add -D @pandacss/dev
Run
panda init
to generate the styled-system directoryIn the
docusaurus.config.ts
file, set up the Panda postcss plugin