@rsbuild/plugin-vue2 0.7.0-beta.5 → 0.7.0-beta.6
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 +10 -10
- package/dist/index.js +11 -14
- package/package.json +5 -5
package/dist/index.cjs
CHANGED
|
@@ -38,7 +38,6 @@ __export(src_exports, {
|
|
|
38
38
|
pluginVue2: () => pluginVue2
|
|
39
39
|
});
|
|
40
40
|
module.exports = __toCommonJS(src_exports);
|
|
41
|
-
var import_shared2 = require("@rsbuild/shared");
|
|
42
41
|
var import_vue_loader = require("vue-loader");
|
|
43
42
|
|
|
44
43
|
// src/VueLoader15PitchFixPlugin.ts
|
|
@@ -142,15 +141,16 @@ function pluginVue2(options = {}) {
|
|
|
142
141
|
if (!chain.resolve.alias.get("vue$")) {
|
|
143
142
|
chain.resolve.alias.set("vue$", "vue/dist/vue.runtime.esm.js");
|
|
144
143
|
}
|
|
145
|
-
const
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
144
|
+
const userLoaderOptions = options.vueLoaderOptions ?? {};
|
|
145
|
+
const compilerOptions = {
|
|
146
|
+
preserveWhitespace: false,
|
|
147
|
+
...userLoaderOptions.compilerOptions
|
|
148
|
+
};
|
|
149
|
+
const vueLoaderOptions = {
|
|
150
|
+
experimentalInlineMatchResource: true,
|
|
151
|
+
...userLoaderOptions,
|
|
152
|
+
compilerOptions
|
|
153
|
+
};
|
|
154
154
|
chain.module.rule(CHAIN_ID.RULE.VUE).test(VUE_REGEXP).use(CHAIN_ID.USE.VUE).loader(require.resolve("vue-loader")).options(vueLoaderOptions);
|
|
155
155
|
chain.plugin(CHAIN_ID.PLUGIN.VUE_LOADER_PLUGIN).use(import_vue_loader.VueLoaderPlugin);
|
|
156
156
|
chain.plugin(CHAIN_ID.PLUGIN.VUE_LOADER_15_PITCH_FIX_PLUGIN).use(VueLoader15PitchFixPlugin);
|
package/dist/index.js
CHANGED
|
@@ -20,7 +20,6 @@ import { fileURLToPath } from "url";
|
|
|
20
20
|
import path from "path";
|
|
21
21
|
|
|
22
22
|
// src/index.ts
|
|
23
|
-
import { deepmerge } from "@rsbuild/shared";
|
|
24
23
|
import { VueLoaderPlugin } from "vue-loader";
|
|
25
24
|
|
|
26
25
|
// src/VueLoader15PitchFixPlugin.ts
|
|
@@ -63,10 +62,7 @@ var VueLoader15PitchFixPlugin = class {
|
|
|
63
62
|
};
|
|
64
63
|
|
|
65
64
|
// src/splitChunks.ts
|
|
66
|
-
import {
|
|
67
|
-
createCacheGroups,
|
|
68
|
-
isPlainObject
|
|
69
|
-
} from "@rsbuild/shared";
|
|
65
|
+
import { createCacheGroups, isPlainObject } from "@rsbuild/shared";
|
|
70
66
|
var applySplitChunksRule = (api, options = {
|
|
71
67
|
vue: true,
|
|
72
68
|
router: true
|
|
@@ -127,15 +123,16 @@ function pluginVue2(options = {}) {
|
|
|
127
123
|
if (!chain.resolve.alias.get("vue$")) {
|
|
128
124
|
chain.resolve.alias.set("vue$", "vue/dist/vue.runtime.esm.js");
|
|
129
125
|
}
|
|
130
|
-
const
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
126
|
+
const userLoaderOptions = options.vueLoaderOptions ?? {};
|
|
127
|
+
const compilerOptions = {
|
|
128
|
+
preserveWhitespace: false,
|
|
129
|
+
...userLoaderOptions.compilerOptions
|
|
130
|
+
};
|
|
131
|
+
const vueLoaderOptions = {
|
|
132
|
+
experimentalInlineMatchResource: true,
|
|
133
|
+
...userLoaderOptions,
|
|
134
|
+
compilerOptions
|
|
135
|
+
};
|
|
139
136
|
chain.module.rule(CHAIN_ID.RULE.VUE).test(VUE_REGEXP).use(CHAIN_ID.USE.VUE).loader(__require.resolve("vue-loader")).options(vueLoaderOptions);
|
|
140
137
|
chain.plugin(CHAIN_ID.PLUGIN.VUE_LOADER_PLUGIN).use(VueLoaderPlugin);
|
|
141
138
|
chain.plugin(CHAIN_ID.PLUGIN.VUE_LOADER_15_PITCH_FIX_PLUGIN).use(VueLoader15PitchFixPlugin);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/plugin-vue2",
|
|
3
|
-
"version": "0.7.0-beta.
|
|
3
|
+
"version": "0.7.0-beta.6",
|
|
4
4
|
"description": "Vue 2 plugin of Rsbuild",
|
|
5
5
|
"homepage": "https://rsbuild.dev",
|
|
6
6
|
"repository": {
|
|
@@ -25,16 +25,16 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"vue-loader": "^15.11.1",
|
|
27
27
|
"webpack": "^5.91.0",
|
|
28
|
-
"@rsbuild/shared": "0.7.0-beta.
|
|
28
|
+
"@rsbuild/shared": "0.7.0-beta.6"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"typescript": "^5.4.2",
|
|
32
32
|
"webpack": "^5.91.0",
|
|
33
|
-
"@rsbuild/core": "0.7.0-beta.
|
|
34
|
-
"@scripts/test-helper": "0.7.0-beta.
|
|
33
|
+
"@rsbuild/core": "0.7.0-beta.6",
|
|
34
|
+
"@scripts/test-helper": "0.7.0-beta.6"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
|
-
"@rsbuild/core": "^0.7.0-beta.
|
|
37
|
+
"@rsbuild/core": "^0.7.0-beta.6"
|
|
38
38
|
},
|
|
39
39
|
"publishConfig": {
|
|
40
40
|
"access": "public",
|