befly-vite 1.7.8 → 1.7.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -1
- package/index.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -565,6 +565,8 @@ const finalRoutes = Layouts(routes, "/dashboard", function (layoutName) {
|
|
|
565
565
|
|
|
566
566
|
### 最常见脚本写法
|
|
567
567
|
|
|
568
|
+
页面项目自己的 `package.json` 在这里主要只保留运行脚本;在 Befly 仓库内,`lint` / `format` 的配置文件、根脚本和提交钩子统一跟随仓库根 `oxfmt.config.ts` / `oxlint.config.ts` 与共享 Oxc 基线,不要在基于 `befly-vite` 的页面包里再复制第二套可执行 Oxc 配置。
|
|
569
|
+
|
|
568
570
|
```json
|
|
569
571
|
{
|
|
570
572
|
"scripts": {
|
|
@@ -579,7 +581,8 @@ const finalRoutes = Layouts(routes, "/dashboard", function (layoutName) {
|
|
|
579
581
|
|
|
580
582
|
1. 自动定位 `vite` 可执行文件
|
|
581
583
|
2. 用 Bun 转发执行 `vite`
|
|
582
|
-
3.
|
|
584
|
+
3. 保持页面项目运行脚本写法统一
|
|
585
|
+
4. 让页面包把 `dev/build/preview` 和 `lint/format` 的职责边界分开:运行脚本留在页面包,代码规范跟随根配置
|
|
583
586
|
|
|
584
587
|
## 完整案例
|
|
585
588
|
|
package/index.js
CHANGED
|
@@ -6,9 +6,9 @@ import vue from "@vitejs/plugin-vue";
|
|
|
6
6
|
import AutoImport from "unplugin-auto-import/vite";
|
|
7
7
|
import { TDesignResolver } from "unplugin-vue-components/resolvers";
|
|
8
8
|
import Components from "unplugin-vue-components/vite";
|
|
9
|
+
import { defineConfig, mergeConfig } from "vite";
|
|
9
10
|
import bundleAnalyzer from "vite-bundle-analyzer";
|
|
10
11
|
import VueDevTools from "vite-plugin-vue-devtools";
|
|
11
|
-
import { defineConfig, mergeConfig } from "vite";
|
|
12
12
|
import { VueRouterAutoImports } from "vue-router/unplugin";
|
|
13
13
|
import VueRouter from "vue-router/vite";
|
|
14
14
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "befly-vite",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.9",
|
|
4
4
|
"gitHead": "282f7accca9c8d55956a5490c0365cce4a1ad90d",
|
|
5
5
|
"private": false,
|
|
6
6
|
"description": "Befly Vite 配置预设和插件集合",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@vitejs/plugin-vue": "^6.0.7",
|
|
41
|
-
"sass": "^1.
|
|
41
|
+
"sass": "^1.100.0",
|
|
42
42
|
"unplugin-auto-import": "^21.0.0",
|
|
43
43
|
"unplugin-vue-components": "^32.1.0",
|
|
44
44
|
"vite": "^8.0.14",
|