befly-vite 1.4.9 → 1.4.10
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/index.js +0 -7
- package/package.json +2 -3
- package/plugins/reactivity-transform.js +11 -27
package/index.js
CHANGED
|
@@ -9,7 +9,6 @@ import { createAutoImportPlugin } from "./plugins/auto-import.js";
|
|
|
9
9
|
import { createComponentsPlugin } from "./plugins/components.js";
|
|
10
10
|
import { createDevToolsPlugin } from "./plugins/devtools.js";
|
|
11
11
|
import { createIconsPlugin } from "./plugins/icons.js";
|
|
12
|
-
import { createReactivityTransformPlugin } from "./plugins/reactivity-transform.js";
|
|
13
12
|
import { createRouterPlugin } from "./plugins/router.js";
|
|
14
13
|
import { createVuePlugin } from "./plugins/vue.js";
|
|
15
14
|
|
|
@@ -61,11 +60,6 @@ function defaultManualChunks(id) {
|
|
|
61
60
|
return "icons";
|
|
62
61
|
}
|
|
63
62
|
|
|
64
|
-
// Vue Macros
|
|
65
|
-
if (id.match(/node_modules[/\\](@vue-macros|vue-macros)[/\\]/)) {
|
|
66
|
-
return "vue-macros";
|
|
67
|
-
}
|
|
68
|
-
|
|
69
63
|
// 注意:不要把所有 addon 或 node_modules 强制合并到单个 chunk。
|
|
70
64
|
// - addon 路由(importMode: async)应按页面懒加载自然拆分。
|
|
71
65
|
// - node_modules 让 Rollup 按共享与动态导入边界自动拆分即可。
|
|
@@ -113,7 +107,6 @@ export function createBeflyViteConfig(options = {}) {
|
|
|
113
107
|
const plugins = [];
|
|
114
108
|
plugins.push(createRouterPlugin({ routesFolders: routesFolders }));
|
|
115
109
|
plugins.push(createVuePlugin());
|
|
116
|
-
plugins.push(createReactivityTransformPlugin());
|
|
117
110
|
plugins.push(createDevToolsPlugin());
|
|
118
111
|
plugins.push(createAutoImportPlugin({ resolvers: resolvers }));
|
|
119
112
|
plugins.push(createComponentsPlugin({ resolvers: resolvers }));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "befly-vite",
|
|
3
|
-
"version": "1.4.
|
|
4
|
-
"gitHead": "
|
|
3
|
+
"version": "1.4.10",
|
|
4
|
+
"gitHead": "f9f6bca0385e275961720d686bab20b2e2167f87",
|
|
5
5
|
"private": false,
|
|
6
6
|
"description": "Befly Vite 配置预设和插件集合",
|
|
7
7
|
"keywords": [
|
|
@@ -35,7 +35,6 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@vitejs/plugin-vue": "^6.0.3",
|
|
38
|
-
"@vue-macros/reactivity-transform": "^3.1.2",
|
|
39
38
|
"sass": "^1.97.2",
|
|
40
39
|
"unplugin-auto-import": "^21.0.0",
|
|
41
40
|
"unplugin-icons": "^23.0.1",
|
|
@@ -1,30 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* ⚠️ 说明
|
|
3
|
+
*
|
|
4
|
+
* 本仓库已不再依赖 @vue-macros/reactivity-transform。
|
|
5
|
+
*
|
|
6
|
+
* 这个文件保留为“空实现”,避免旧项目/旧代码在仍引用 createReactivityTransformPlugin 时直接崩溃。
|
|
7
|
+
* 新项目请使用 Vue 原生 ref/reactive/computed 等 API,不要使用 $ref/$computed/$shallowRef 宏。
|
|
8
|
+
*/
|
|
2
9
|
|
|
3
|
-
// 创建 Vue Reactivity Transform 插件配置
|
|
4
10
|
export function createReactivityTransformPlugin() {
|
|
5
|
-
return
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
// Vite 对 .vue SFC 子模块会追加 query(如 ?vue&type=script),因此需要允许可选 query
|
|
9
|
-
/[\\/]src[\\/].*\.(vue|ts|tsx)(\?.*)?$/,
|
|
10
|
-
|
|
11
|
-
// workspace 内的 addon 视图(如 packages/addonAdmin/adminViews)属于源码,需要宏转换
|
|
12
|
-
/[\\/]packages[\\/].*[\\/](adminViews|appViews)[\\/].*\.vue(\?.*)?$/,
|
|
13
|
-
|
|
14
|
-
// node_modules 内的 @befly-addon 视图也属于源码,需要宏转换
|
|
15
|
-
/[\\/]node_modules[\\/]@befly-addon[\\/].*[\\/](adminViews|appViews)[\\/].*\.vue(\?.*)?$/,
|
|
16
|
-
|
|
17
|
-
// Bun isolated linker:真实路径通常为 node_modules/.bun/**/node_modules/@befly-addon/**
|
|
18
|
-
/[\\/]node_modules[\\/]\\.bun[\\/].*[\\/]node_modules[\\/]@befly-addon[\\/].*[\\/](adminViews|appViews)[\\/].*\.vue(\?.*)?$/
|
|
19
|
-
],
|
|
20
|
-
exclude: [
|
|
21
|
-
// 排除绝大多数 node_modules,但保留 @befly-addon(其内部视图属于源码,需要宏转换)
|
|
22
|
-
// 同时放行 Bun store 的 .bun/**/node_modules/@befly-addon/** 形态,避免被误伤导致 $ref 未转换
|
|
23
|
-
/[\\/]node_modules[\\/](?!@befly-addon[\\/]|\\.bun[\\/].*[\\/]node_modules[\\/]@befly-addon[\\/])/,
|
|
24
|
-
|
|
25
|
-
/[\\/]dist[\\/]/,
|
|
26
|
-
/[\\/]temp[\\/]/,
|
|
27
|
-
/[\\/]\\.git[\\/]/
|
|
28
|
-
]
|
|
29
|
-
});
|
|
11
|
+
return {
|
|
12
|
+
name: "befly-no-reactivity-transform"
|
|
13
|
+
};
|
|
30
14
|
}
|