@rsbuild/plugin-vue 1.1.2 → 1.2.0
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 +1 -1
- package/dist/index.js +3 -3
- package/package.json +9 -9
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
const __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;
|
|
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, {
|
|
@@ -18,7 +18,7 @@ __webpack_require__.r(__webpack_exports__), __webpack_require__.d(__webpack_expo
|
|
|
18
18
|
PLUGIN_VUE_NAME: ()=>PLUGIN_VUE_NAME,
|
|
19
19
|
pluginVue: ()=>pluginVue
|
|
20
20
|
});
|
|
21
|
-
|
|
21
|
+
const external_node_module_namespaceObject = require("node:module"), external_rspack_vue_loader_namespaceObject = require("rspack-vue-loader"), isPlainObject = (obj)=>null !== obj && 'object' == typeof obj && '[object Object]' === Object.prototype.toString.call(obj), applySplitChunksRule = (api, options = {
|
|
22
22
|
vue: !0,
|
|
23
23
|
router: !0
|
|
24
24
|
})=>{
|
|
@@ -30,7 +30,7 @@ let external_node_module_namespaceObject = require("node:module"), external_vue_
|
|
|
30
30
|
let extraGroups = {};
|
|
31
31
|
options.vue && (extraGroups.vue = {
|
|
32
32
|
name: 'lib-vue',
|
|
33
|
-
test: /node_modules[\\/](?:vue|vue-loader|@vue[\\/]shared|@vue[\\/]reactivity|@vue[\\/]runtime-dom|@vue[\\/]runtime-core)[\\/]/,
|
|
33
|
+
test: /node_modules[\\/](?:vue|rspack-vue-loader|@vue[\\/]shared|@vue[\\/]reactivity|@vue[\\/]runtime-dom|@vue[\\/]runtime-core)[\\/]/,
|
|
34
34
|
priority: 0
|
|
35
35
|
}), options.router && (extraGroups.router = {
|
|
36
36
|
name: 'lib-router',
|
|
@@ -74,7 +74,7 @@ function pluginVue(options = {}) {
|
|
|
74
74
|
...userLoaderOptions,
|
|
75
75
|
compilerOptions
|
|
76
76
|
};
|
|
77
|
-
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(
|
|
77
|
+
chain.module.rule(CHAIN_ID.RULE.VUE).test(VUE_REGEXP).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
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RsbuildPlugin } from '@rsbuild/core';
|
|
2
|
-
import { type VueLoaderOptions } from 'vue-loader';
|
|
2
|
+
import { type VueLoaderOptions } from 'rspack-vue-loader';
|
|
3
3
|
export type SplitVueChunkOptions = {
|
|
4
4
|
/**
|
|
5
5
|
* Whether to enable split chunking for Vue-related dependencies (e.g., vue, vue-loader).
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
|
-
import { VueLoaderPlugin } from "vue-loader";
|
|
2
|
+
import { VueLoaderPlugin } from "rspack-vue-loader";
|
|
3
3
|
let src_require = createRequire(import.meta.url), PLUGIN_VUE_NAME = 'rsbuild:vue';
|
|
4
4
|
function pluginVue(options = {}) {
|
|
5
5
|
return {
|
|
@@ -30,7 +30,7 @@ function pluginVue(options = {}) {
|
|
|
30
30
|
...userLoaderOptions,
|
|
31
31
|
compilerOptions
|
|
32
32
|
};
|
|
33
|
-
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(VueLoaderPlugin);
|
|
33
|
+
chain.module.rule(CHAIN_ID.RULE.VUE).test(VUE_REGEXP).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
|
|
@@ -43,7 +43,7 @@ function pluginVue(options = {}) {
|
|
|
43
43
|
let extraGroups = {};
|
|
44
44
|
options.vue && (extraGroups.vue = {
|
|
45
45
|
name: 'lib-vue',
|
|
46
|
-
test: /node_modules[\\/](?:vue|vue-loader|@vue[\\/]shared|@vue[\\/]reactivity|@vue[\\/]runtime-dom|@vue[\\/]runtime-core)[\\/]/,
|
|
46
|
+
test: /node_modules[\\/](?:vue|rspack-vue-loader|@vue[\\/]shared|@vue[\\/]reactivity|@vue[\\/]runtime-dom|@vue[\\/]runtime-core)[\\/]/,
|
|
47
47
|
priority: 0
|
|
48
48
|
}), options.router && (extraGroups.router = {
|
|
49
49
|
name: 'lib-router',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/plugin-vue",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Vue 3 plugin of Rsbuild",
|
|
5
5
|
"homepage": "https://rsbuild.rs",
|
|
6
6
|
"repository": {
|
|
@@ -23,15 +23,15 @@
|
|
|
23
23
|
"dist"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"vue-loader": "^17.4.
|
|
27
|
-
"webpack": "^5.
|
|
26
|
+
"rspack-vue-loader": "^17.4.4",
|
|
27
|
+
"webpack": "^5.102.1"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@rslib/core": "0.
|
|
31
|
-
"@types/node": "^22.
|
|
32
|
-
"typescript": "^5.9.
|
|
33
|
-
"vue": "^3.5.
|
|
34
|
-
"@rsbuild/core": "1.
|
|
30
|
+
"@rslib/core": "0.15.1",
|
|
31
|
+
"@types/node": "^22.18.11",
|
|
32
|
+
"typescript": "^5.9.3",
|
|
33
|
+
"vue": "^3.5.22",
|
|
34
|
+
"@rsbuild/core": "1.6.0-beta.0",
|
|
35
35
|
"@scripts/test-helper": "1.0.1"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
},
|
|
44
44
|
"scripts": {
|
|
45
45
|
"build": "rslib build",
|
|
46
|
-
"dev": "rslib build
|
|
46
|
+
"dev": "rslib build -w",
|
|
47
47
|
"bump": "pnpx bumpp --no-tag"
|
|
48
48
|
}
|
|
49
49
|
}
|