@rsbuild/plugin-vue 1.0.5 → 1.0.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/README.md CHANGED
@@ -1,19 +1,19 @@
1
- <p align="center">
2
- <a href="https://rsbuild.dev" target="blank"><img src="https://github.com/web-infra-dev/rsbuild/assets/7237365/84abc13e-b620-468f-a90b-dbf28e7e9427" alt="Rsbuild Logo" /></a>
3
- </p>
1
+ # @rsbuild/plugin-vue
4
2
 
5
- # Rsbuild
3
+ An Rsbuild plugin to provide support for Vue 3.
6
4
 
7
- The Rspack-based build tool. It's fast, out-of-the-box and extensible.
5
+ <p>
6
+ <a href="https://npmjs.com/package/@rsbuild/plugin-vue">
7
+ <img src="https://img.shields.io/npm/v/@rsbuild/plugin-vue?style=flat-square&colorA=564341&colorB=EDED91" alt="npm version" />
8
+ </a>
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?minimal=true"><img src="https://img.shields.io/npm/dm/@rsbuild/plugin-vue.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="downloads" /></a>
11
+ </p>
8
12
 
9
13
  ## Documentation
10
14
 
11
- https://rsbuild.dev/
12
-
13
- ## Contributing
14
-
15
- Please read the [Contributing Guide](https://github.com/web-infra-dev/rsbuild/blob/main/CONTRIBUTING.md).
15
+ See [Documentation](https://rsbuild.dev/plugins/list/plugin-vue).
16
16
 
17
17
  ## License
18
18
 
19
- Rsbuild is [MIT licensed](https://github.com/web-infra-dev/rsbuild/blob/main/LICENSE).
19
+ [MIT](https://github.com/web-infra-dev/rsbuild/blob/main/LICENSE).
package/dist/index.cjs CHANGED
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
+ let __rslib_import_meta_url__ = 'undefined' == typeof document ? new (require('url'.replace('', ''))).URL('file:' + __filename).href : document.currentScript && document.currentScript.src || new URL('main.js', document.baseURI).href;
2
3
  var __webpack_require__ = {};
3
4
  __webpack_require__.d = function(exports1, definition) {
4
5
  for(var key in definition)__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key) && Object.defineProperty(exports1, key, {
@@ -29,7 +30,7 @@ let external_node_module_namespaceObject = require("node:module"), external_vue_
29
30
  let currentConfig = chain.optimization.splitChunks.values();
30
31
  if (!isPlainObject(currentConfig)) return;
31
32
  let extraGroups = {};
32
- if (options.vue && (extraGroups.vue = {
33
+ options.vue && (extraGroups.vue = {
33
34
  name: 'lib-vue',
34
35
  test: /node_modules[\\/](?:vue|vue-loader|@vue[\\/]shared|@vue[\\/]reactivity|@vue[\\/]runtime-dom|@vue[\\/]runtime-core)[\\/]/,
35
36
  priority: 0
@@ -37,7 +38,7 @@ let external_node_module_namespaceObject = require("node:module"), external_vue_
37
38
  name: 'lib-router',
38
39
  test: /node_modules[\\/]vue-router[\\/]/,
39
40
  priority: 0
40
- }), !!Object.keys(extraGroups).length) chain.optimization.splitChunks({
41
+ }), Object.keys(extraGroups).length && chain.optimization.splitChunks({
41
42
  ...currentConfig,
42
43
  cacheGroups: {
43
44
  ...extraGroups,
@@ -45,7 +46,7 @@ let external_node_module_namespaceObject = require("node:module"), external_vue_
45
46
  }
46
47
  });
47
48
  });
48
- }, src_require = (0, external_node_module_namespaceObject.createRequire)('undefined' == typeof document ? new (module.require('url'.replace('', ''))).URL('file:' + __filename).href : document.currentScript && document.currentScript.src || new URL('main.js', document.baseURI).href), PLUGIN_VUE_NAME = 'rsbuild:vue';
49
+ }, src_require = (0, external_node_module_namespaceObject.createRequire)(__rslib_import_meta_url__), PLUGIN_VUE_NAME = 'rsbuild:vue';
49
50
  function pluginVue(options = {}) {
50
51
  return {
51
52
  name: PLUGIN_VUE_NAME,
@@ -75,13 +76,13 @@ function pluginVue(options = {}) {
75
76
  ...userLoaderOptions,
76
77
  compilerOptions
77
78
  };
78
- chain.module.rule(CHAIN_ID.RULE.VUE).test(VUE_REGEXP).use(CHAIN_ID.USE.VUE).loader(src_require.resolve('vue-loader')).options(vueLoaderOptions), chain.module.rule(CHAIN_ID.RULE.CSS).test(/\.(?:css|postcss|pcss)$/), chain.plugin(CHAIN_ID.PLUGIN.VUE_LOADER_PLUGIN).use(external_vue_loader_namespaceObject.VueLoaderPlugin);
79
+ chain.module.rule(CHAIN_ID.RULE.VUE).test(VUE_REGEXP).use(CHAIN_ID.USE.VUE).loader(src_require.resolve('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_vue_loader_namespaceObject.VueLoaderPlugin);
79
80
  }), applySplitChunksRule(api, options.splitChunks);
80
81
  }
81
82
  };
82
83
  }
83
84
  var __webpack_export_target__ = exports;
84
- for(var i in __webpack_exports__)__webpack_export_target__[i] = __webpack_exports__[i];
85
+ for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
85
86
  __webpack_exports__.__esModule && Object.defineProperty(__webpack_export_target__, '__esModule', {
86
87
  value: !0
87
88
  });
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import * as __WEBPACK_EXTERNAL_MODULE_node_module__ from "node:module";
2
- import * as __WEBPACK_EXTERNAL_MODULE_vue_loader__ from "vue-loader";
1
+ import * as __WEBPACK_EXTERNAL_MODULE_node_module_ab9f2194__ from "node:module";
2
+ import * as __WEBPACK_EXTERNAL_MODULE_vue_loader_a33e643c__ from "vue-loader";
3
3
  let isPlainObject = (obj)=>null !== obj && 'object' == typeof obj && '[object Object]' === Object.prototype.toString.call(obj), applySplitChunksRule = (api, options = {
4
4
  vue: !0,
5
5
  router: !0
@@ -10,7 +10,7 @@ let isPlainObject = (obj)=>null !== obj && 'object' == typeof obj && '[object Ob
10
10
  let currentConfig = chain.optimization.splitChunks.values();
11
11
  if (!isPlainObject(currentConfig)) return;
12
12
  let extraGroups = {};
13
- if (options.vue && (extraGroups.vue = {
13
+ options.vue && (extraGroups.vue = {
14
14
  name: 'lib-vue',
15
15
  test: /node_modules[\\/](?:vue|vue-loader|@vue[\\/]shared|@vue[\\/]reactivity|@vue[\\/]runtime-dom|@vue[\\/]runtime-core)[\\/]/,
16
16
  priority: 0
@@ -18,7 +18,7 @@ let isPlainObject = (obj)=>null !== obj && 'object' == typeof obj && '[object Ob
18
18
  name: 'lib-router',
19
19
  test: /node_modules[\\/]vue-router[\\/]/,
20
20
  priority: 0
21
- }), !!Object.keys(extraGroups).length) chain.optimization.splitChunks({
21
+ }), Object.keys(extraGroups).length && chain.optimization.splitChunks({
22
22
  ...currentConfig,
23
23
  cacheGroups: {
24
24
  ...extraGroups,
@@ -26,7 +26,7 @@ let isPlainObject = (obj)=>null !== obj && 'object' == typeof obj && '[object Ob
26
26
  }
27
27
  });
28
28
  });
29
- }, src_require = (0, __WEBPACK_EXTERNAL_MODULE_node_module__.createRequire)(import.meta.url), PLUGIN_VUE_NAME = 'rsbuild:vue';
29
+ }, src_require = (0, __WEBPACK_EXTERNAL_MODULE_node_module_ab9f2194__.createRequire)(import.meta.url), PLUGIN_VUE_NAME = 'rsbuild:vue';
30
30
  function pluginVue(options = {}) {
31
31
  return {
32
32
  name: PLUGIN_VUE_NAME,
@@ -56,7 +56,7 @@ function pluginVue(options = {}) {
56
56
  ...userLoaderOptions,
57
57
  compilerOptions
58
58
  };
59
- chain.module.rule(CHAIN_ID.RULE.VUE).test(VUE_REGEXP).use(CHAIN_ID.USE.VUE).loader(src_require.resolve('vue-loader')).options(vueLoaderOptions), chain.module.rule(CHAIN_ID.RULE.CSS).test(/\.(?:css|postcss|pcss)$/), chain.plugin(CHAIN_ID.PLUGIN.VUE_LOADER_PLUGIN).use(__WEBPACK_EXTERNAL_MODULE_vue_loader__.VueLoaderPlugin);
59
+ chain.module.rule(CHAIN_ID.RULE.VUE).test(VUE_REGEXP).use(CHAIN_ID.USE.VUE).loader(src_require.resolve('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(__WEBPACK_EXTERNAL_MODULE_vue_loader_a33e643c__.VueLoaderPlugin);
60
60
  }), applySplitChunksRule(api, options.splitChunks);
61
61
  }
62
62
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsbuild/plugin-vue",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "Vue 3 plugin of Rsbuild",
5
5
  "homepage": "https://rsbuild.dev",
6
6
  "repository": {
@@ -24,15 +24,15 @@
24
24
  ],
25
25
  "dependencies": {
26
26
  "vue-loader": "^17.4.2",
27
- "webpack": "^5.96.1"
27
+ "webpack": "^5.98.0"
28
28
  },
29
29
  "devDependencies": {
30
- "@rslib/core": "0.0.18",
31
- "@types/node": "^22.9.0",
32
- "typescript": "^5.6.3",
33
- "vue": "^3.5.12",
34
- "webpack": "^5.96.1",
35
- "@rsbuild/core": "1.1.2",
30
+ "@rslib/core": "0.5.2",
31
+ "@types/node": "^22.13.8",
32
+ "typescript": "^5.8.2",
33
+ "vue": "^3.5.13",
34
+ "webpack": "^5.98.0",
35
+ "@rsbuild/core": "1.2.16",
36
36
  "@scripts/test-helper": "1.0.1"
37
37
  },
38
38
  "peerDependencies": {