halo/ui
Ryan Wang 1e5958dd5c
chore: refactor ui plugin bundler kit and support rsbuild (#7568)
#### What type of PR is this?

/area ui
/kind feature
/area plugin
/milestone 2.21.x

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

This PR adds Rsbuild preset configuration support and refactors the Vite preset configuration approach for `@halo-dev/ui-plugin-bundler-kit`.

- **Added Rsbuild support** - New `rsbuildConfig` function with pre-configured settings for Halo plugin development
- **Refactored Vite configuration** - Improved `viteConfig` function with better preset handling
- **Updated documentation** - Comprehensive README with usage examples and build tool comparison

example:

```typescript
// Vite
import { viteConfig } from "@halo-dev/ui-plugin-bundler-kit";
export default viteConfig({ vite: { /* custom config */ } });

// Rsbuild
import { rsbuildConfig } from "@halo-dev/ui-plugin-bundler-kit";
export default rsbuildConfig({ rsbuild: { /* custom config */ } });
```

real-world example: https://github.com/guqing/plugin-metrics-graph/pull/5

For detailed configuration options and examples, please refer to the updated README.md

⚠️ `HaloUIPluginBundlerKit` function is now deprecated (still functional but marked for removal)

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

Fixes #

#### Special notes for your reviewer:

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

```release-note
重构 `@halo-dev/ui-plugin-bundler-kit`,以预配置的方式为插件提供 Vite 和 Rsbuild 的构建配置。
```
2025-06-18 10:38:57 +00:00
..
.husky Fix the problem of being unable to commit (#5362) 2024-02-18 08:00:16 +00:00
.vscode chore: add prettier-plugin-organize-imports plugin to organize imports (#6836) 2024-10-12 07:05:09 +00:00
console-src feat: add cover for deleted post list in console (#7565) 2025-06-17 15:06:55 +00:00
docs feat: refine i18n for dashboard widgets config form (#7511) 2025-06-09 16:20:33 +00:00
packages chore: refactor ui plugin bundler kit and support rsbuild (#7568) 2025-06-18 10:38:57 +00:00
public Move folder console to ui 2024-02-02 22:22:51 +08:00
scripts feat: add i18n tooling scripts and refine translations (#7269) 2025-03-06 10:16:59 +00:00
src chore: fix incorrect imports (#7558) 2025-06-16 14:26:52 +00:00
uc-src refactor: remove unused width prop for post title field (#7545) 2025-06-13 06:50:42 +00:00
.editorconfig Move folder console to ui 2024-02-02 22:22:51 +08:00
.env.development chore: remove unnecessary env (#6022) 2024-05-30 08:31:16 +00:00
.env.production chore: remove unnecessary env (#6022) 2024-05-30 08:31:16 +00:00
.eslintrc.cjs chore: remove unused dependencies and configuration files (#6917) 2024-10-22 06:54:29 +00:00
.gitignore Move folder console to ui 2024-02-02 22:22:51 +08:00
.gitpod.yml Move folder console to ui 2024-02-02 22:22:51 +08:00
.npmignore Move folder console to ui 2024-02-02 22:22:51 +08:00
.npmrc Move folder console to ui 2024-02-02 22:22:51 +08:00
.prettierignore Generate API docs and regenerate API client (#5742) 2024-04-19 02:34:07 +00:00
Makefile Move folder console to ui 2024-02-02 22:22:51 +08:00
README.md chore: update Halo official website URL (#6514) 2024-08-26 15:53:04 +08:00
build.gradle Refactor dependencies and plugins with version catelog 2025-05-19 16:05:56 +08:00
env.d.ts feat: add support for setting an owner for posts (#6178) 2024-06-27 10:10:55 +00:00
index.html refactor: implementation of browser tab title (#5794) 2024-04-25 03:43:10 +00:00
package.json chore: remove unnecessary ts checks and enable parallel build (#7548) 2025-06-13 07:54:42 +00:00
pnpm-lock.yaml chore: refactor ui plugin bundler kit and support rsbuild (#7568) 2025-06-18 10:38:57 +00:00
pnpm-workspace.yaml Move folder console to ui 2024-02-02 22:22:51 +08:00
postcss.config.cjs chore: bump vite to 5.x (#5920) 2024-05-16 06:18:36 +00:00
prettier.config.cjs chore: add prettier-plugin-organize-imports plugin to organize imports (#6836) 2024-10-12 07:05:09 +00:00
tailwind.config.cjs refactor: improve button component styles (#7517) 2025-06-09 15:38:34 +00:00
tsconfig.app.json chore: bump vue version to 3.5 (#6696) 2024-09-26 08:11:31 +00:00
tsconfig.json Move folder console to ui 2024-02-02 22:22:51 +08:00
tsconfig.node.json chore: remove unused dependencies and configuration files (#6917) 2024-10-22 06:54:29 +00:00
tsconfig.vitest.json Move folder console to ui 2024-02-02 22:22:51 +08:00
vite.config.ts chore: organize and fix imports (#6152) 2024-06-26 10:42:50 +00:00
vite.uc.config.ts chore: organize and fix imports (#6152) 2024-06-26 10:42:50 +00:00
vitest.config.ts refactor: improve drag-and-drop sorting feature for menu items (#7423) 2025-05-14 10:16:21 +08:00

README.md

README

Halo logo

Halo 2.0 的管理端项目(原 halo-admin

GitHub release GitHub GitHub last commit GitHub Workflow Status Gitpod ready-to-code


当前仓库已经将 halo-admin 改为了 console。但对于 Halo 1.x 版本,依旧保持 halo-admin 的概念。

开发环境运行

npm install -g pnpm@9
pnpm install 
pnpm build:packages
pnpm dev

生产构建

pnpm build

状态

Repobeats analytics