1. NextJs 使用
可参考 NextJs Demo
import dynamic from 'next/dynamic';
import 'solive-core/dist/index.css';
const Editor = dynamic(
() => import('solive-core'),
{ ssr: false },
);
// ...
2. Docusaurus2 使用
React Component
<BrowserOnly fallback={<div>Loading...</div>}>
{() => {
// eslint-disable-next-line @typescript-eslint/no-var-requires,global-require
const Editor = require('solive-core').default;
return (
<Editor
id="1"
modelInfos={[]}
height="500px"
/>
);
}}
</BrowserOnly>