@rsbuild/plugin-vue 0.7.0-beta.5 → 0.7.0-beta.7

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 CHANGED
@@ -33,7 +33,6 @@ __export(src_exports, {
33
33
  pluginVue: () => pluginVue
34
34
  });
35
35
  module.exports = __toCommonJS(src_exports);
36
- var import_shared2 = require("@rsbuild/shared");
37
36
  var import_vue_loader = require("vue-loader");
38
37
 
39
38
  // src/splitChunks.ts
@@ -110,15 +109,16 @@ function pluginVue(options = {}) {
110
109
  });
111
110
  api.modifyBundlerChain(async (chain, { CHAIN_ID }) => {
112
111
  chain.resolve.extensions.add(".vue");
113
- const vueLoaderOptions = (0, import_shared2.deepmerge)(
114
- {
115
- compilerOptions: {
116
- preserveWhitespace: false
117
- },
118
- experimentalInlineMatchResource: true
119
- },
120
- options.vueLoaderOptions ?? {}
121
- );
112
+ const userLoaderOptions = options.vueLoaderOptions ?? {};
113
+ const compilerOptions = {
114
+ preserveWhitespace: false,
115
+ ...userLoaderOptions.compilerOptions
116
+ };
117
+ const vueLoaderOptions = {
118
+ experimentalInlineMatchResource: true,
119
+ ...userLoaderOptions,
120
+ compilerOptions
121
+ };
122
122
  chain.module.rule(CHAIN_ID.RULE.VUE).test(VUE_REGEXP).use(CHAIN_ID.USE.VUE).loader(require.resolve("vue-loader")).options(vueLoaderOptions);
123
123
  chain.plugin(CHAIN_ID.PLUGIN.VUE_LOADER_PLUGIN).use(import_vue_loader.VueLoaderPlugin);
124
124
  });
package/dist/index.js CHANGED
@@ -14,14 +14,10 @@ import { fileURLToPath } from "url";
14
14
  import path from "path";
15
15
 
16
16
  // src/index.ts
17
- import { deepmerge } from "@rsbuild/shared";
18
17
  import { VueLoaderPlugin } from "vue-loader";
19
18
 
20
19
  // src/splitChunks.ts
21
- import {
22
- createCacheGroups,
23
- isPlainObject
24
- } from "@rsbuild/shared";
20
+ import { createCacheGroups, isPlainObject } from "@rsbuild/shared";
25
21
  var applySplitChunksRule = (api, options = {
26
22
  vue: true,
27
23
  router: true
@@ -94,15 +90,16 @@ function pluginVue(options = {}) {
94
90
  });
95
91
  api.modifyBundlerChain(async (chain, { CHAIN_ID }) => {
96
92
  chain.resolve.extensions.add(".vue");
97
- const vueLoaderOptions = deepmerge(
98
- {
99
- compilerOptions: {
100
- preserveWhitespace: false
101
- },
102
- experimentalInlineMatchResource: true
103
- },
104
- options.vueLoaderOptions ?? {}
105
- );
93
+ const userLoaderOptions = options.vueLoaderOptions ?? {};
94
+ const compilerOptions = {
95
+ preserveWhitespace: false,
96
+ ...userLoaderOptions.compilerOptions
97
+ };
98
+ const vueLoaderOptions = {
99
+ experimentalInlineMatchResource: true,
100
+ ...userLoaderOptions,
101
+ compilerOptions
102
+ };
106
103
  chain.module.rule(CHAIN_ID.RULE.VUE).test(VUE_REGEXP).use(CHAIN_ID.USE.VUE).loader(__require.resolve("vue-loader")).options(vueLoaderOptions);
107
104
  chain.plugin(CHAIN_ID.PLUGIN.VUE_LOADER_PLUGIN).use(VueLoaderPlugin);
108
105
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsbuild/plugin-vue",
3
- "version": "0.7.0-beta.5",
3
+ "version": "0.7.0-beta.7",
4
4
  "description": "Vue 3 plugin of Rsbuild",
5
5
  "homepage": "https://rsbuild.dev",
6
6
  "repository": {
@@ -25,17 +25,17 @@
25
25
  "dependencies": {
26
26
  "vue-loader": "^17.4.0",
27
27
  "webpack": "^5.91.0",
28
- "@rsbuild/shared": "0.7.0-beta.5"
28
+ "@rsbuild/shared": "0.7.0-beta.7"
29
29
  },
30
30
  "devDependencies": {
31
31
  "typescript": "^5.4.2",
32
32
  "vue": "^3.4.19",
33
33
  "webpack": "^5.91.0",
34
- "@rsbuild/core": "0.7.0-beta.5",
35
- "@scripts/test-helper": "0.7.0-beta.5"
34
+ "@rsbuild/core": "0.7.0-beta.7",
35
+ "@scripts/test-helper": "0.7.0-beta.7"
36
36
  },
37
37
  "peerDependencies": {
38
- "@rsbuild/core": "^0.7.0-beta.5"
38
+ "@rsbuild/core": "^0.7.0-beta.7"
39
39
  },
40
40
  "publishConfig": {
41
41
  "access": "public",