Closed ycycxz closed 1 year ago
I don't think any of the Clarity web components work in a node server context.
using <BrowserOnly>
facebook/docusaurus#8338
Example:
<BrowserOnly fallback={<div>Loading...</div>}>
{() => {
require("@cds/core/icon/register.js");
const {
ClarityIcons,
airplaneIcon,
bellIcon,
bullseyeIcon,
chatBubbleIcon,
crownIcon,
pluginIcon,
computerIcon,
devicesIcon,
infoStandardIcon,
envelopeIcon,
wifiIcon,
storeIcon,
talkBubblesIcon,
terminalIcon,
nodesIcon,
piggyBankIcon,
usersIcon,
} = require("@cds/core/icon");
ClarityIcons.addIcons(
airplaneIcon,
bellIcon,
bullseyeIcon,
chatBubbleIcon,
crownIcon,
pluginIcon,
computerIcon,
devicesIcon,
infoStandardIcon,
envelopeIcon,
piggyBankIcon,
storeIcon,
talkBubblesIcon,
terminalIcon,
nodesIcon,
usersIcon,
wifiIcon
);
}}
</BrowserOnly>
<cds-icon shape="chat-bubble" size="lg"></cds-icon>
Hi there 👋, this is an automated message. To help Clarity keep track of discussions, we automatically lock closed issues after 14 days. Please look for another open issue or open a new issue with updated details and reference this one as necessary.
Version: Docusaurus 2.2.0
test.js
file at pages folderwhen
yarn run start
everythig is finebut
yarn build