@rsbuild/plugin-vue 1.2.1 → 1.2.3
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 +1 -1
- package/dist/index.cjs +12 -3
- package/dist/index.js +10 -1
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ An Rsbuild plugin to provide support for Vue 3.
|
|
|
7
7
|
<img src="https://img.shields.io/npm/v/@rsbuild/plugin-vue?style=flat-square&colorA=564341&colorB=EDED91" alt="npm version" />
|
|
8
8
|
</a>
|
|
9
9
|
<img src="https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="license" />
|
|
10
|
-
<a href="https://npmcharts.com/compare/@rsbuild/plugin-vue
|
|
10
|
+
<a href="https://npmcharts.com/compare/@rsbuild/plugin-vue"><img src="https://img.shields.io/npm/dm/@rsbuild/plugin-vue.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="downloads" /></a>
|
|
11
11
|
</p>
|
|
12
12
|
|
|
13
13
|
## Documentation
|
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const __rslib_import_meta_url__ =
|
|
2
|
+
const __rslib_import_meta_url__ = "u" < typeof document ? new (require('url'.replace('', ''))).URL('file:' + __filename).href : document.currentScript && document.currentScript.src || new URL('main.js', document.baseURI).href;
|
|
3
3
|
var __webpack_require__ = {};
|
|
4
4
|
__webpack_require__.d = (exports1, definition)=>{
|
|
5
5
|
for(var key in definition)__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key) && Object.defineProperty(exports1, key, {
|
|
@@ -7,7 +7,7 @@ __webpack_require__.d = (exports1, definition)=>{
|
|
|
7
7
|
get: definition[key]
|
|
8
8
|
});
|
|
9
9
|
}, __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop), __webpack_require__.r = (exports1)=>{
|
|
10
|
-
|
|
10
|
+
"u" > typeof Symbol && Symbol.toStringTag && Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
11
11
|
value: 'Module'
|
|
12
12
|
}), Object.defineProperty(exports1, '__esModule', {
|
|
13
13
|
value: !0
|
|
@@ -63,13 +63,22 @@ function pluginVue(options = {}) {
|
|
|
63
63
|
]
|
|
64
64
|
}
|
|
65
65
|
}, config);
|
|
66
|
-
return !0 === merged.output.cssModules.auto && (merged.output.cssModules.auto = (path, query)=>
|
|
66
|
+
return !0 === merged.output.cssModules.auto && (merged.output.cssModules.auto = (path, query)=>{
|
|
67
|
+
if ((VUE_REGEXP.test(path) || path.includes('.vue.css')) && query) try {
|
|
68
|
+
let params = new URLSearchParams(query);
|
|
69
|
+
return 'style' === params.get('type') && params.has('module');
|
|
70
|
+
} catch {
|
|
71
|
+
return !1;
|
|
72
|
+
}
|
|
73
|
+
return CSS_MODULES_REGEX.test(path);
|
|
74
|
+
}), merged;
|
|
67
75
|
}), api.modifyBundlerChain((chain, { CHAIN_ID })=>{
|
|
68
76
|
chain.resolve.extensions.add('.vue');
|
|
69
77
|
let userLoaderOptions = options.vueLoaderOptions ?? {}, compilerOptions = {
|
|
70
78
|
preserveWhitespace: !1,
|
|
71
79
|
...userLoaderOptions.compilerOptions
|
|
72
80
|
}, vueLoaderOptions = {
|
|
81
|
+
isServerBuild: 'rstest' !== api.context.callerName && void 0,
|
|
73
82
|
experimentalInlineMatchResource: !0,
|
|
74
83
|
...userLoaderOptions,
|
|
75
84
|
compilerOptions
|
package/dist/index.js
CHANGED
|
@@ -19,13 +19,22 @@ function pluginVue(options = {}) {
|
|
|
19
19
|
]
|
|
20
20
|
}
|
|
21
21
|
}, config);
|
|
22
|
-
return !0 === merged.output.cssModules.auto && (merged.output.cssModules.auto = (path, query)=>
|
|
22
|
+
return !0 === merged.output.cssModules.auto && (merged.output.cssModules.auto = (path, query)=>{
|
|
23
|
+
if ((VUE_REGEXP.test(path) || path.includes('.vue.css')) && query) try {
|
|
24
|
+
let params = new URLSearchParams(query);
|
|
25
|
+
return 'style' === params.get('type') && params.has('module');
|
|
26
|
+
} catch {
|
|
27
|
+
return !1;
|
|
28
|
+
}
|
|
29
|
+
return CSS_MODULES_REGEX.test(path);
|
|
30
|
+
}), merged;
|
|
23
31
|
}), api.modifyBundlerChain((chain, { CHAIN_ID })=>{
|
|
24
32
|
chain.resolve.extensions.add('.vue');
|
|
25
33
|
let userLoaderOptions = options.vueLoaderOptions ?? {}, compilerOptions = {
|
|
26
34
|
preserveWhitespace: !1,
|
|
27
35
|
...userLoaderOptions.compilerOptions
|
|
28
36
|
}, vueLoaderOptions = {
|
|
37
|
+
isServerBuild: 'rstest' !== api.context.callerName && void 0,
|
|
29
38
|
experimentalInlineMatchResource: !0,
|
|
30
39
|
...userLoaderOptions,
|
|
31
40
|
compilerOptions
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/plugin-vue",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.3",
|
|
4
4
|
"description": "Vue 3 plugin of Rsbuild",
|
|
5
5
|
"homepage": "https://rsbuild.rs",
|
|
6
6
|
"repository": {
|
|
@@ -24,18 +24,18 @@
|
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"rspack-vue-loader": "^17.4.4",
|
|
27
|
-
"webpack": "^5.
|
|
27
|
+
"webpack": "^5.104.1"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@rslib/core": "0.
|
|
31
|
-
"@types/node": "^24.10.
|
|
30
|
+
"@rslib/core": "0.19.1",
|
|
31
|
+
"@types/node": "^24.10.4",
|
|
32
32
|
"typescript": "^5.9.3",
|
|
33
|
-
"vue": "^3.5.
|
|
34
|
-
"@
|
|
35
|
-
"@
|
|
33
|
+
"vue": "^3.5.26",
|
|
34
|
+
"@scripts/test-helper": "1.0.1",
|
|
35
|
+
"@rsbuild/core": "1.7.2"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"@rsbuild/core": "1.
|
|
38
|
+
"@rsbuild/core": "^1.0.0 || ^2.0.0-0"
|
|
39
39
|
},
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public",
|