Skip to content

Commit

Permalink
chore: bump editor version and let it load globally (halo-dev#4924)
Browse files Browse the repository at this point in the history
#### What type of PR is this?

/area console
/area editor
/milestone 2.11.0
/kind improvement

#### What this PR does / why we need it:

升级编辑器依赖,并将其全局注册,此 PR 合并之后,插件如果需要扩展编辑器,则不必引入其中依赖,可以完全排除。

#### Which issue(s) this PR fixes:

- halo-sigs/richtext-editor#71 Fixes halo-dev#4868

#### Does this PR introduce a user-facing change?

```release-note
升级默认编辑器版本。
```
  • Loading branch information
ruibaby authored Nov 27, 2023
1 parent 96d4897 commit 99edbdd
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"@halo-dev/api-client": "workspace:*",
"@halo-dev/components": "workspace:*",
"@halo-dev/console-shared": "workspace:*",
"@halo-dev/richtext-editor": "0.0.0-alpha.32",
"@halo-dev/richtext-editor": "0.0.0-alpha.33",
"@tanstack/vue-query": "^4.29.1",
"@tiptap/extension-character-count": "^2.0.4",
"@uppy/core": "^3.4.0",
Expand Down
8 changes: 4 additions & 4 deletions console/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions console/src/vite/library-external.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ export const setupLibraryExternal = (
dest: "assets/console-shared",
rename: `halo-console-shared.iife.${staticSuffix}.js`,
},
{
src: "./node_modules/@halo-dev/richtext-editor/dist/rich-text-editor.iife.js",
dest: "assets/richtext-editor",
rename: `halo-rich-text-editor.iife.${staticSuffix}.js`,
},
];

const injectTags = staticTargets
Expand All @@ -99,6 +104,7 @@ export const setupLibraryExternal = (
"@vueuse/components": "VueUse",
"@vueuse/router": "VueUse",
"vue-demi": "VueDemi",
"@halo-dev/richtext-editor": "RichTextEditor",
}),
ViteStaticCopy({
targets: staticTargets,
Expand Down

0 comments on commit 99edbdd

Please sign in to comment.