From ebb8ef530a59abf5365298aa539c4f6e528e36c4 Mon Sep 17 00:00:00 2001 From: chenchongqiang Date: Fri, 21 Apr 2023 00:15:59 +0800 Subject: [PATCH] fix(docusaurus-plugin): fix plugin transform-model.ts import error lib --- .changeset/happy-fans-complain.md | 5 +++++ apps/doc/docs/expansion/docusaurus-plugins/guide.mdx | 5 +++++ .../docusaurus-plugin/src/theme/utils/transform-model.ts | 3 +-- 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 .changeset/happy-fans-complain.md diff --git a/.changeset/happy-fans-complain.md b/.changeset/happy-fans-complain.md new file mode 100644 index 0000000..a0c558c --- /dev/null +++ b/.changeset/happy-fans-complain.md @@ -0,0 +1,5 @@ +--- +"solive-docusaurus-theme-code": patch +--- + +fix plugin transform-model.ts import error lib diff --git a/apps/doc/docs/expansion/docusaurus-plugins/guide.mdx b/apps/doc/docs/expansion/docusaurus-plugins/guide.mdx index 732c64d..2fa6b80 100644 --- a/apps/doc/docs/expansion/docusaurus-plugins/guide.mdx +++ b/apps/doc/docs/expansion/docusaurus-plugins/guide.mdx @@ -16,6 +16,11 @@ slug: /docusaurus-plugins npm install --save solive-docusaurus-theme-code ``` +2. 安装一些配置需要的依赖项(暂未找到较好的方案内置): +```bash npm2yarn +npm install -D stream-http https-browserify stream-browserify crypto-browserify stream-browserify path-browserify events os-browserify buffer url assert tty-browserify util browserify-zlib +``` + 2. 其次你需要在你的 `docusaurus.config.js` 中配置 `solive` 插件. ```js {3} diff --git a/packages/docusaurus-plugin/src/theme/utils/transform-model.ts b/packages/docusaurus-plugin/src/theme/utils/transform-model.ts index ae993d9..6e812ea 100644 --- a/packages/docusaurus-plugin/src/theme/utils/transform-model.ts +++ b/packages/docusaurus-plugin/src/theme/utils/transform-model.ts @@ -1,5 +1,4 @@ -import { SupportLanguage } from 'solive-core'; -import { ModelInfoType } from 'solive-core/src'; +import { ModelInfoType, SupportLanguage } from 'solive-core'; import { TMeta } from './resolve-meta'; import solidityFormatter from './format-code';