Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/WeBankFinTech/fes.js
Browse files Browse the repository at this point in the history
  • Loading branch information
wanchun committed Dec 10, 2024
2 parents 63e55cc + e7a7b95 commit 9ba8d1a
Show file tree
Hide file tree
Showing 27 changed files with 2,099 additions and 397 deletions.
61 changes: 61 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,64 @@
## [3.4.7](https://github.com/WeBankFinTech/fes.js/compare/v3.4.5...v3.4.7) (2024-12-01)


### Bug Fixes

* 代理插件兼容 array 写法 ([#260](https://github.com/WeBankFinTech/fes.js/issues/260)) ([7c01ee9](https://github.com/WeBankFinTech/fes.js/commit/7c01ee979e0776101c0f00bebca8a283d48cef6e))
* 受控模式优化 ([#262](https://github.com/WeBankFinTech/fes.js/issues/262)) ([4d28a09](https://github.com/WeBankFinTech/fes.js/commit/4d28a09c85ff1d140ffbc086b7ca6f24e02c6a4f))
* 修复pc模版无法启动问题 ([#261](https://github.com/WeBankFinTech/fes.js/issues/261)) ([b1ea675](https://github.com/WeBankFinTech/fes.js/commit/b1ea675f40b158266c28bcc7fedfd3eabba9f38c))


### Features

* 添加 console 配置,支持输出 version ([#263](https://github.com/WeBankFinTech/fes.js/issues/263)) ([c7ad0cd](https://github.com/WeBankFinTech/fes.js/commit/c7ad0cd8062d50519e3aea7ca957320967d41d41))
* webpack-dev 升级到5.x,提升 dev 性能,优化日志输出 ([#259](https://github.com/WeBankFinTech/fes.js/issues/259)) ([efd8708](https://github.com/WeBankFinTech/fes.js/commit/efd87087522cd2dce6b5dc89fbe93ef46efd08bf))



## [3.4.6](https://github.com/WeBankFinTech/fes.js/compare/v3.4.5...v3.4.6) (2024-11-28)


### Bug Fixes

* 代理插件兼容 array 写法 ([#260](https://github.com/WeBankFinTech/fes.js/issues/260)) ([7c01ee9](https://github.com/WeBankFinTech/fes.js/commit/7c01ee979e0776101c0f00bebca8a283d48cef6e))
* 受控模式优化 ([#262](https://github.com/WeBankFinTech/fes.js/issues/262)) ([4d28a09](https://github.com/WeBankFinTech/fes.js/commit/4d28a09c85ff1d140ffbc086b7ca6f24e02c6a4f))
* 修复pc模版无法启动问题 ([#261](https://github.com/WeBankFinTech/fes.js/issues/261)) ([b1ea675](https://github.com/WeBankFinTech/fes.js/commit/b1ea675f40b158266c28bcc7fedfd3eabba9f38c))


### Features

* webpack-dev 升级到5.x,提升 dev 性能,优化日志输出 ([#259](https://github.com/WeBankFinTech/fes.js/issues/259)) ([efd8708](https://github.com/WeBankFinTech/fes.js/commit/efd87087522cd2dce6b5dc89fbe93ef46efd08bf))



## [3.4.5](https://github.com/WeBankFinTech/fes.js/compare/v3.4.3...v3.4.5) (2024-11-19)


### Bug Fixes

* 控制 tab 是否可以刷新 ([#257](https://github.com/WeBankFinTech/fes.js/issues/257)) ([4b3fb7b](https://github.com/WeBankFinTech/fes.js/commit/4b3fb7b3d120a36eb894b47a7c08267888b53c15))


### Features

* menu 支持配置 _blank 在新页面打开 ([#258](https://github.com/WeBankFinTech/fes.js/issues/258)) ([eb6ed75](https://github.com/WeBankFinTech/fes.js/commit/eb6ed75dd45bea746b2dac339f2c2aae5b361b66))



## [3.4.4](https://github.com/WeBankFinTech/fes.js/compare/v3.4.3...v3.4.4) (2024-11-19)


### Bug Fixes

* 控制 tab 是否可以刷新 ([#257](https://github.com/WeBankFinTech/fes.js/issues/257)) ([4b3fb7b](https://github.com/WeBankFinTech/fes.js/commit/4b3fb7b3d120a36eb894b47a7c08267888b53c15))


### Features

* menu 支持配置 _blank 在新页面打开 ([#258](https://github.com/WeBankFinTech/fes.js/issues/258)) ([eb6ed75](https://github.com/WeBankFinTech/fes.js/commit/eb6ed75dd45bea746b2dac339f2c2aae5b361b66))



## [3.4.3](https://github.com/WeBankFinTech/fes.js/compare/v3.4.2...v3.4.3) (2024-11-12)


Expand Down
110 changes: 59 additions & 51 deletions docs/.vitepress/configs/sidebar/zh.ts
Original file line number Diff line number Diff line change
@@ -1,167 +1,175 @@

export const zh = {
'/guide/': [
{
text: '开始',
items: [
{
text: '介绍',
link: '/guide/index.md'
link: '/guide/index.md',
},
{
text: '快速上手',
link: '/guide/getting-started.md'
}
link: '/guide/getting-started.md',
},
],
},
{
text: '基础',
items: [
{
text: '目录结构',
link: '/guide/directory-structure.md'
},{
link: '/guide/directory-structure.md',
},
{
text: 'Vite 和 Webpack 双构建',
link: '/guide/builder.md'
},{
link: '/guide/builder.md',
},
{
text: '编译时配置',
link: '/guide/config.md'
},{
link: '/guide/config.md',
},
{
text: '运行时配置',
link: '/guide/runtime-config.md'
},{
link: '/guide/runtime-config.md',
},
{
text: '环境变量',
link: '/guide/env.md'
},{
link: '/guide/env.md',
},
{
text: '路由',
link: '/guide/route.md'
},{
link: '/guide/route.md',
},
{
text: '插件',
link: '/guide/plugin.md'
},{
link: '/guide/plugin.md',
},
{
text: 'HTML 模板',
link: '/guide/template.md'
},{
link: '/guide/template.md',
},
{
text: 'Mock 数据',
link: '/guide/mock.md'
},{
text: '从 2.0.x 迁移到 3.0.x',
link: '/guide/upgrade3.md'
}
link: '/guide/mock.md',
},
{
text: '从 2.x 迁移到 3.x',
link: '/guide/upgrade3.md',
},
],
},
{
text: '样式和资源文件',
items: [
{
text: '使用图片',
link: '/guide/image.md'
link: '/guide/image.md',
},
{
text: '使用 css',
link: '/guide/css.md'
link: '/guide/css.md',
},
{
text: '静态资源',
link: '/guide/public.md'
}
link: '/guide/public.md',
},
],
},
{
text: '贡献指南',
link: '/guide/contributing.md'
link: '/guide/contributing.md',
},
{
text: '常见问题',
link: '/guide/faq.md'
link: '/guide/faq.md',
},
],
'/reference/plugin/': [
{
text: '介绍',
link: '/reference/plugin/index.md'
link: '/reference/plugin/index.md',
},
{
text: 'Plugins',
items: [
{
text: '@fesjs/plugin-access',
link: '/reference/plugin/plugins/access.md'
link: '/reference/plugin/plugins/access.md',
},
{
text: '@fesjs/plugin-enums',
link: '/reference/plugin/plugins/enums.md'
link: '/reference/plugin/plugins/enums.md',
},
{
text: '@fesjs/plugin-icon',
link: '/reference/plugin/plugins/icon.md'
link: '/reference/plugin/plugins/icon.md',
},
{
text: '@fesjs/plugin-jest',
link: '/reference/plugin/plugins/jest.md'
link: '/reference/plugin/plugins/jest.md',
},
{
text: '@fesjs/plugin-layout',
link: '/reference/plugin/plugins/layout.md'
link: '/reference/plugin/plugins/layout.md',
},
{
text: '@fesjs/plugin-locale',
link: '/reference/plugin/plugins/locale.md'
link: '/reference/plugin/plugins/locale.md',
},
{
text: '@fesjs/plugin-model',
link: '/reference/plugin/plugins/model.md'
link: '/reference/plugin/plugins/model.md',
},
{
text: '@fesjs/plugin-request',
link: '/reference/plugin/plugins/request.md'
link: '/reference/plugin/plugins/request.md',
},
{
text: '@fesjs/plugin-vuex',
link: '/reference/plugin/plugins/vuex.md'
link: '/reference/plugin/plugins/vuex.md',
},
{
text: '@fesjs/plugin-qiankun',
link: '/reference/plugin/plugins/qiankun.md'
link: '/reference/plugin/plugins/qiankun.md',
},
{
text: '@fesjs/plugin-windicss',
link: '/reference/plugin/plugins/windicss.md'
link: '/reference/plugin/plugins/windicss.md',
},
{
text: '@fesjs/plugin-sass',
link: '/reference/plugin/plugins/sass.md'
link: '/reference/plugin/plugins/sass.md',
},
{
text: '@fesjs/plugin-editor',
link: '/reference/plugin/plugins/editor.md'
link: '/reference/plugin/plugins/editor.md',
},
{
text: '@fesjs/plugin-pinia',
link: '/reference/plugin/plugins/pinia.md'
link: '/reference/plugin/plugins/pinia.md',
},
{
text: '@fesjs/plugin-watermark',
link: '/reference/plugin/plugins/watermark.md'
link: '/reference/plugin/plugins/watermark.md',
},
{
text: '@fesjs/plugin-login',
link: '/reference/plugin/plugins/login.md'
link: '/reference/plugin/plugins/login.md',
},
{
text: '@fesjs/plugin-swc',
link: '/reference/plugin/plugins/swc.md'
link: '/reference/plugin/plugins/swc.md',
},
],
},
{
text: '插件开发',
items: [{
text: '插件介绍',
link: '/reference/plugin/dev/index.md'
link: '/reference/plugin/dev/index.md',
}, {
text: '插件API',
link: '/reference/plugin/dev/api.md'
link: '/reference/plugin/dev/api.md',
}],
},
],
Expand Down
4 changes: 2 additions & 2 deletions docs/guide/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import { withBase } from 'vitepress'

## 依赖环境

首先得有 [Node.js](https://nodejs.org/),并确保 node 版本是 12.13 或以上。
首先得有 [Node.js](https://nodejs.org/),并确保 node 版本是 `v18.12.0` 或以上。

```bash
# 打印 node 版本
node -v
v12.13.0
v18.12.0
```

推荐使用 [pnpm](https://pnpm.io/installation) 管理 npm 依赖
Expand Down
29 changes: 15 additions & 14 deletions docs/guide/upgrade3.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
# 从 2.0.x 迁移到 3.0.x
# 从 2.x 迁移到 3.x

## 版本 3.0.x 的 break
## 版本 3.x 的 break

1. 编译时的 [base](../reference/config/index.md/#base) 配置,移到了 [router.base](../reference/config/index.md/#router) 下。
2. [webpack-dev-server](https://github.com/webpack/webpack-dev-server)`v3.x` 升级到了 `v4.x`,如果遇到配置不兼容,可以查看[webpack-dev-server 3.x 升级 4.x](https://github.com/webpack/webpack-dev-server/blob/master/migration-v4.md)
3. [layout 插件](../reference/plugin/plugins/layout.md#_4-x-升级到-5-x) 有一些属性变更
3. [request 插件](../reference/plugin/plugins/request.md#_2-x-升级到-3-x) 有一些参数变更
1. 环境要求 `node >= v18.12.0`
2. 编译时的 [base](../reference/config/index.md/#base) 配置,移到了 [router.base](../reference/config/index.md/#router)
3. [webpack-dev-server](https://github.com/webpack/webpack-dev-server)`v3.x` 升级到了 `v5.x`,如果遇到配置不兼容,可以查看[webpack-dev-server 3.x 升级 4.x](https://github.com/webpack/webpack-dev-server/blob/master/migration-v4.md)[webpack-dev-server 4.x 升级 5.x](https://github.com/webpack/webpack-dev-server/blob/master/migration-v5.md)
4. [layout 插件](../reference/plugin/plugins/layout.md#_4-x-升级到-5-x) 有一些属性变更
5. [request 插件](../reference/plugin/plugins/request.md#_2-x-升级到-3-x) 有一些参数变更,升级请使用最新版本

## 继续使用 Webpack

1. 添加 Webpack 构建依赖包: `npm i @fesjs/builder-webpack -D`
2. 如果设置了 `publicPath: './'`,请更改为 `publicPath: ''`
3. 将 html 模版文件从 `public/index.html` 文件挪到项目根目录,移除 [html-webpack-plugin](https://github.com/jantimon/html-webpack-plugin) 相关配置,具体模版变量使用请查看[HTML 模版](../guide/template.html)
1. 添加 Webpack 构建依赖包: `npm i @fesjs/builder-webpack -D`
2. `dev``publicPath` 配置不能为 `./`,请更改为 `auto`
3. 将 html 模版文件从 `public/index.html` 挪到项目根目录,移除 [html-webpack-plugin](https://github.com/jantimon/html-webpack-plugin) 相关配置,具体模版变量使用请查看[HTML 模版](../guide/template.html)

## 换成 Vite

1. 安装依赖包 `npm i @fesjs/builder-vite`
2. 将 Webpack 相关的配置换成 Vite,具体可查看[配置](../reference/config/index.md)
3. 将 html 模版文件从 `public/index.html` 挪到项目根目录,如果有相应的 [html-webpack-plugin](https://github.com/jantimon/html-webpack-plugin) 配置,需要改成 [vite-plugin-html](https://github.com/vbenjs/vite-plugin-html) 的写法
4.`require` 等 Vite 不支持的代码,改写成 Vite 支持的方式
1. 安装依赖包 `npm i @fesjs/builder-vite`
2. 将 Webpack 相关的配置换成 Vite,具体可查看[配置](../reference/config/index.md)
3. 将 html 模版文件从 `public/index.html` 挪到项目根目录,如果有相应的 [html-webpack-plugin](https://github.com/jantimon/html-webpack-plugin) 配置,需要改成 [vite-plugin-html](https://github.com/vbenjs/vite-plugin-html) 的写法
4.`require` 等 Vite 不支持的代码,改写成 Vite 支持的方式

## 插件

插件都需要升级到 `3.0.x` 版本,新版添加了兼容`builder`的逻辑,但是提供的接口和配置没有变化,只需要升级版本即可使用。
插件都需要升级到 `3.x` 版本,新版添加了兼容`builder`的逻辑,但是提供的接口和配置没有变化,只需要升级版本即可使用。

- [@fesjs/plugin-layout](../reference/plugin/plugins/layout.md) 需要升级到`5.0.x`版本。
- [@fesjs/plugin-locale](../reference/plugin/plugins/locale.md) 需要升级到`4.0.x`版本。
Expand Down
16 changes: 16 additions & 0 deletions docs/reference/config/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,22 @@ export default {
};
```

### console

- 类型: `object`
- 默认值:`{}`
- 详情:
用于控制应用启动的时候在 console 中打印的信息,目前仅支持 version
- 示例:

```js
export default {
console: {
version: true
}
};
```

### define

- 类型: `object`
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "fes.js",
"type": "module",
"version": "3.4.3",
"version": "3.4.7",
"private": true,
"packageManager": "[email protected]",
"description": "一个好用的前端管理台快速开发框架",
Expand Down
2 changes: 1 addition & 1 deletion packages/create-fes-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fesjs/create-fes-app",
"version": "3.0.4",
"version": "3.0.6",
"description": "create a app base on fes.js",
"main": "lib/index.js",
"files": [
Expand Down
Loading

0 comments on commit 9ba8d1a

Please sign in to comment.