@rsbuild/plugin-vue 1.2.5 → 1.2.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
@@ -54,7 +54,7 @@ function pluginVue(options = {}) {
54
54
  return {
55
55
  name: PLUGIN_VUE_NAME,
56
56
  setup (api) {
57
- let VUE_REGEXP = /\.vue$/, { test = VUE_REGEXP } = options, CSS_MODULES_REGEX = /\.modules?\.\w+$/i;
57
+ let { test = /\.vue$/ } = options, CSS_MODULES_REGEX = /\.modules?\.\w+$/i;
58
58
  api.modifyEnvironmentConfig((config, { mergeEnvironmentConfig })=>{
59
59
  let merged = mergeEnvironmentConfig({
60
60
  source: {
@@ -69,7 +69,7 @@ function pluginVue(options = {}) {
69
69
  }
70
70
  }, config);
71
71
  return !0 === merged.output.cssModules.auto && (merged.output.cssModules.auto = (path, query)=>{
72
- if ((VUE_REGEXP.test(path) || path.includes('.vue.css')) && query) try {
72
+ if ((path.endsWith('.vue') || path.includes('.vue.css')) && query) try {
73
73
  let params = new URLSearchParams(query);
74
74
  return 'style' === params.get('type') && params.has('module');
75
75
  } catch {
package/dist/index.js CHANGED
@@ -35,7 +35,7 @@ function pluginVue(options = {}) {
35
35
  return {
36
36
  name: PLUGIN_VUE_NAME,
37
37
  setup (api) {
38
- let VUE_REGEXP = /\.vue$/, { test = VUE_REGEXP } = options, CSS_MODULES_REGEX = /\.modules?\.\w+$/i;
38
+ let { test = /\.vue$/ } = options, CSS_MODULES_REGEX = /\.modules?\.\w+$/i;
39
39
  api.modifyEnvironmentConfig((config, { mergeEnvironmentConfig })=>{
40
40
  let merged = mergeEnvironmentConfig({
41
41
  source: {
@@ -50,7 +50,7 @@ function pluginVue(options = {}) {
50
50
  }
51
51
  }, config);
52
52
  return !0 === merged.output.cssModules.auto && (merged.output.cssModules.auto = (path, query)=>{
53
- if ((VUE_REGEXP.test(path) || path.includes('.vue.css')) && query) try {
53
+ if ((path.endsWith('.vue') || path.includes('.vue.css')) && query) try {
54
54
  let params = new URLSearchParams(query);
55
55
  return 'style' === params.get('type') && params.has('module');
56
56
  } catch {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsbuild/plugin-vue",
3
- "version": "1.2.5",
3
+ "version": "1.2.7",
4
4
  "description": "Vue 3 plugin of Rsbuild",
5
5
  "homepage": "https://rsbuild.rs",
6
6
  "repository": {
@@ -23,21 +23,25 @@
23
23
  "dist"
24
24
  ],
25
25
  "dependencies": {
26
- "rspack-vue-loader": "^17.4.5",
27
- "webpack": "^5.104.1"
26
+ "rspack-vue-loader": "^17.5.0"
28
27
  },
29
28
  "devDependencies": {
30
- "@rsbuild/core-v1": "npm:@rsbuild/core@^1.7.2",
31
- "@rslib/core": "0.19.4",
32
- "@types/node": "^24.10.9",
29
+ "@rsbuild/core-v1": "npm:@rsbuild/core@^1.7.3",
30
+ "@rslib/core": "0.20.0",
31
+ "@types/node": "^24.12.0",
33
32
  "typescript": "^5.9.3",
34
- "vue": "^3.5.27",
35
- "@rsbuild/core": "2.0.0-beta.0",
36
- "@scripts/test-helper": "1.0.1"
33
+ "vue": "^3.5.29",
34
+ "@rsbuild/core": "2.0.0-beta.8",
35
+ "@scripts/test-helper": "1.0.0"
37
36
  },
38
37
  "peerDependencies": {
39
38
  "@rsbuild/core": "^1.0.0 || ^2.0.0-0"
40
39
  },
40
+ "peerDependenciesMeta": {
41
+ "@rsbuild/core": {
42
+ "optional": true
43
+ }
44
+ },
41
45
  "publishConfig": {
42
46
  "access": "public",
43
47
  "registry": "https://registry.npmjs.org/"