@rsbuild/plugin-vue 1.2.0 → 1.2.1
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 +4 -4
- package/dist/index.d.ts +6 -1
- package/dist/index.js +2 -2
- package/package.json +6 -6
package/dist/index.cjs
CHANGED
|
@@ -49,7 +49,7 @@ function pluginVue(options = {}) {
|
|
|
49
49
|
return {
|
|
50
50
|
name: PLUGIN_VUE_NAME,
|
|
51
51
|
setup (api) {
|
|
52
|
-
let VUE_REGEXP = /\.vue$/, CSS_MODULES_REGEX = /\.modules?\.\w+$/i;
|
|
52
|
+
let VUE_REGEXP = /\.vue$/, { test = VUE_REGEXP } = options, CSS_MODULES_REGEX = /\.modules?\.\w+$/i;
|
|
53
53
|
api.modifyEnvironmentConfig((config, { mergeEnvironmentConfig })=>{
|
|
54
54
|
let merged = mergeEnvironmentConfig({
|
|
55
55
|
source: {
|
|
@@ -74,15 +74,15 @@ function pluginVue(options = {}) {
|
|
|
74
74
|
...userLoaderOptions,
|
|
75
75
|
compilerOptions
|
|
76
76
|
};
|
|
77
|
-
chain.module.rule(CHAIN_ID.RULE.VUE).test(
|
|
77
|
+
chain.module.rule(CHAIN_ID.RULE.VUE).test(test).use(CHAIN_ID.USE.VUE).loader(src_require.resolve('rspack-vue-loader')).options(vueLoaderOptions), chain.module.rule(CHAIN_ID.RULE.CSS).test(/\.(?:css|postcss|pcss)$/), chain.plugin(CHAIN_ID.PLUGIN.VUE_LOADER_PLUGIN).before(CHAIN_ID.PLUGIN.REACT_FAST_REFRESH).use(external_rspack_vue_loader_namespaceObject.VueLoaderPlugin);
|
|
78
78
|
}), applySplitChunksRule(api, options.splitChunks);
|
|
79
79
|
}
|
|
80
80
|
};
|
|
81
81
|
}
|
|
82
|
-
for(var
|
|
82
|
+
for(var __rspack_i in exports.PLUGIN_VUE_NAME = __webpack_exports__.PLUGIN_VUE_NAME, exports.pluginVue = __webpack_exports__.pluginVue, __webpack_exports__)-1 === [
|
|
83
83
|
"PLUGIN_VUE_NAME",
|
|
84
84
|
"pluginVue"
|
|
85
|
-
].indexOf(
|
|
85
|
+
].indexOf(__rspack_i) && (exports[__rspack_i] = __webpack_exports__[__rspack_i]);
|
|
86
86
|
Object.defineProperty(exports, '__esModule', {
|
|
87
87
|
value: !0
|
|
88
88
|
});
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RsbuildPlugin } from '@rsbuild/core';
|
|
1
|
+
import type { RsbuildPlugin, Rspack } from '@rsbuild/core';
|
|
2
2
|
import { type VueLoaderOptions } from 'rspack-vue-loader';
|
|
3
3
|
export type SplitVueChunkOptions = {
|
|
4
4
|
/**
|
|
@@ -13,6 +13,11 @@ export type SplitVueChunkOptions = {
|
|
|
13
13
|
router?: boolean;
|
|
14
14
|
};
|
|
15
15
|
export type PluginVueOptions = {
|
|
16
|
+
/**
|
|
17
|
+
* Test condition to match Vue files.
|
|
18
|
+
* @default /\.vue$/
|
|
19
|
+
*/
|
|
20
|
+
test?: Rspack.RuleSetCondition;
|
|
16
21
|
/**
|
|
17
22
|
* Options passed to `vue-loader`.
|
|
18
23
|
* @see https://vue-loader.vuejs.org/
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ function pluginVue(options = {}) {
|
|
|
5
5
|
return {
|
|
6
6
|
name: PLUGIN_VUE_NAME,
|
|
7
7
|
setup (api) {
|
|
8
|
-
let VUE_REGEXP = /\.vue$/, CSS_MODULES_REGEX = /\.modules?\.\w+$/i;
|
|
8
|
+
let VUE_REGEXP = /\.vue$/, { test = VUE_REGEXP } = options, CSS_MODULES_REGEX = /\.modules?\.\w+$/i;
|
|
9
9
|
api.modifyEnvironmentConfig((config, { mergeEnvironmentConfig })=>{
|
|
10
10
|
let merged = mergeEnvironmentConfig({
|
|
11
11
|
source: {
|
|
@@ -30,7 +30,7 @@ function pluginVue(options = {}) {
|
|
|
30
30
|
...userLoaderOptions,
|
|
31
31
|
compilerOptions
|
|
32
32
|
};
|
|
33
|
-
chain.module.rule(CHAIN_ID.RULE.VUE).test(
|
|
33
|
+
chain.module.rule(CHAIN_ID.RULE.VUE).test(test).use(CHAIN_ID.USE.VUE).loader(src_require.resolve('rspack-vue-loader')).options(vueLoaderOptions), chain.module.rule(CHAIN_ID.RULE.CSS).test(/\.(?:css|postcss|pcss)$/), chain.plugin(CHAIN_ID.PLUGIN.VUE_LOADER_PLUGIN).before(CHAIN_ID.PLUGIN.REACT_FAST_REFRESH).use(VueLoaderPlugin);
|
|
34
34
|
}), ((api, options = {
|
|
35
35
|
vue: !0,
|
|
36
36
|
router: !0
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/plugin-vue",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "Vue 3 plugin of Rsbuild",
|
|
5
5
|
"homepage": "https://rsbuild.rs",
|
|
6
6
|
"repository": {
|
|
@@ -24,14 +24,14 @@
|
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"rspack-vue-loader": "^17.4.4",
|
|
27
|
-
"webpack": "^5.
|
|
27
|
+
"webpack": "^5.103.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@rslib/core": "0.
|
|
31
|
-
"@types/node": "^
|
|
30
|
+
"@rslib/core": "0.18.3",
|
|
31
|
+
"@types/node": "^24.10.1",
|
|
32
32
|
"typescript": "^5.9.3",
|
|
33
|
-
"vue": "^3.5.
|
|
34
|
-
"@rsbuild/core": "1.6.
|
|
33
|
+
"vue": "^3.5.25",
|
|
34
|
+
"@rsbuild/core": "1.6.13",
|
|
35
35
|
"@scripts/test-helper": "1.0.1"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|