@rsbuild/plugin-vue 1.0.0-alpha.2 → 1.0.0-alpha.4
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/dist/index.cjs +11 -8
- package/dist/index.js +11 -8
- package/package.json +5 -6
package/dist/index.cjs
CHANGED
|
@@ -37,7 +37,6 @@ module.exports = __toCommonJS(src_exports);
|
|
|
37
37
|
var import_vue_loader = require("vue-loader");
|
|
38
38
|
|
|
39
39
|
// src/splitChunks.ts
|
|
40
|
-
var import_shared = require("@rsbuild/shared");
|
|
41
40
|
var isPlainObject = (obj) => obj !== null && typeof obj === "object" && Object.prototype.toString.call(obj) === "[object Object]";
|
|
42
41
|
var applySplitChunksRule = (api, options = {
|
|
43
42
|
vue: true,
|
|
@@ -54,14 +53,18 @@ var applySplitChunksRule = (api, options = {
|
|
|
54
53
|
}
|
|
55
54
|
const extraGroups = {};
|
|
56
55
|
if (options.vue) {
|
|
57
|
-
extraGroups.vue =
|
|
58
|
-
"vue",
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
56
|
+
extraGroups.vue = {
|
|
57
|
+
name: "lib-vue",
|
|
58
|
+
test: /[\\/]node_modules[\\/](?:vue|vue-loader|@vue[\\/]shared|@vue[\\/]reactivity|@vue[\\/]runtime-dom|@vue[\\/]runtime-core)[\\/]/,
|
|
59
|
+
priority: 0
|
|
60
|
+
};
|
|
62
61
|
}
|
|
63
62
|
if (options.router) {
|
|
64
|
-
extraGroups.router =
|
|
63
|
+
extraGroups.router = {
|
|
64
|
+
name: "lib-router",
|
|
65
|
+
test: /[\\/]node_modules[\\/]vue-router[\\/]/,
|
|
66
|
+
priority: 0
|
|
67
|
+
};
|
|
65
68
|
}
|
|
66
69
|
if (!Object.keys(extraGroups).length) {
|
|
67
70
|
return;
|
|
@@ -70,7 +73,7 @@ var applySplitChunksRule = (api, options = {
|
|
|
70
73
|
...currentConfig,
|
|
71
74
|
cacheGroups: {
|
|
72
75
|
...currentConfig.cacheGroups,
|
|
73
|
-
...
|
|
76
|
+
...extraGroups
|
|
74
77
|
}
|
|
75
78
|
});
|
|
76
79
|
});
|
package/dist/index.js
CHANGED
|
@@ -17,7 +17,6 @@ import path from "path";
|
|
|
17
17
|
import { VueLoaderPlugin } from "vue-loader";
|
|
18
18
|
|
|
19
19
|
// src/splitChunks.ts
|
|
20
|
-
import { createCacheGroups } from "@rsbuild/shared";
|
|
21
20
|
var isPlainObject = (obj) => obj !== null && typeof obj === "object" && Object.prototype.toString.call(obj) === "[object Object]";
|
|
22
21
|
var applySplitChunksRule = (api, options = {
|
|
23
22
|
vue: true,
|
|
@@ -34,14 +33,18 @@ var applySplitChunksRule = (api, options = {
|
|
|
34
33
|
}
|
|
35
34
|
const extraGroups = {};
|
|
36
35
|
if (options.vue) {
|
|
37
|
-
extraGroups.vue =
|
|
38
|
-
"vue",
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
36
|
+
extraGroups.vue = {
|
|
37
|
+
name: "lib-vue",
|
|
38
|
+
test: /[\\/]node_modules[\\/](?:vue|vue-loader|@vue[\\/]shared|@vue[\\/]reactivity|@vue[\\/]runtime-dom|@vue[\\/]runtime-core)[\\/]/,
|
|
39
|
+
priority: 0
|
|
40
|
+
};
|
|
42
41
|
}
|
|
43
42
|
if (options.router) {
|
|
44
|
-
extraGroups.router =
|
|
43
|
+
extraGroups.router = {
|
|
44
|
+
name: "lib-router",
|
|
45
|
+
test: /[\\/]node_modules[\\/]vue-router[\\/]/,
|
|
46
|
+
priority: 0
|
|
47
|
+
};
|
|
45
48
|
}
|
|
46
49
|
if (!Object.keys(extraGroups).length) {
|
|
47
50
|
return;
|
|
@@ -50,7 +53,7 @@ var applySplitChunksRule = (api, options = {
|
|
|
50
53
|
...currentConfig,
|
|
51
54
|
cacheGroups: {
|
|
52
55
|
...currentConfig.cacheGroups,
|
|
53
|
-
...
|
|
56
|
+
...extraGroups
|
|
54
57
|
}
|
|
55
58
|
});
|
|
56
59
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/plugin-vue",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.4",
|
|
4
4
|
"description": "Vue 3 plugin of Rsbuild",
|
|
5
5
|
"homepage": "https://rsbuild.dev",
|
|
6
6
|
"repository": {
|
|
@@ -24,18 +24,17 @@
|
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"vue-loader": "^17.4.0",
|
|
27
|
-
"webpack": "^5.92.1"
|
|
28
|
-
"@rsbuild/shared": "1.0.0-alpha.2"
|
|
27
|
+
"webpack": "^5.92.1"
|
|
29
28
|
},
|
|
30
29
|
"devDependencies": {
|
|
31
30
|
"typescript": "^5.5.2",
|
|
32
31
|
"vue": "^3.4.19",
|
|
33
32
|
"webpack": "^5.92.1",
|
|
34
|
-
"@rsbuild/core": "1.0.0-alpha.
|
|
35
|
-
"@scripts/test-helper": "1.0.0-alpha.
|
|
33
|
+
"@rsbuild/core": "1.0.0-alpha.4",
|
|
34
|
+
"@scripts/test-helper": "1.0.0-alpha.4"
|
|
36
35
|
},
|
|
37
36
|
"peerDependencies": {
|
|
38
|
-
"@rsbuild/core": "^1.0.0-alpha.
|
|
37
|
+
"@rsbuild/core": "^1.0.0-alpha.4"
|
|
39
38
|
},
|
|
40
39
|
"publishConfig": {
|
|
41
40
|
"access": "public",
|