@rsbuild/plugin-vue 1.0.1 → 1.0.2
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 +124 -129
- package/dist/index.js +83 -111
- package/{dist-types → dist}/splitChunks.d.ts +1 -1
- package/package.json +11 -12
- package/dist-types/package.json +0 -1
- /package/{dist-types → dist}/index.d.ts +0 -0
package/dist/index.cjs
CHANGED
|
@@ -1,136 +1,131 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
var
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
2
|
+
// The require scope
|
|
3
|
+
var __webpack_require__ = {};
|
|
4
|
+
/************************************************************************/ // webpack/runtime/define_property_getters
|
|
5
|
+
(()=>{
|
|
6
|
+
__webpack_require__.d = function(exports1, definition) {
|
|
7
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: definition[key]
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
})();
|
|
13
|
+
// webpack/runtime/has_own_property
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.o = function(obj, prop) {
|
|
16
|
+
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
17
|
+
};
|
|
18
|
+
})();
|
|
19
|
+
// webpack/runtime/make_namespace_object
|
|
20
|
+
(()=>{
|
|
21
|
+
// define __esModule on exports
|
|
22
|
+
__webpack_require__.r = function(exports1) {
|
|
23
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
24
|
+
value: 'Module'
|
|
25
|
+
});
|
|
26
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
27
|
+
value: true
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
})();
|
|
31
|
+
/************************************************************************/ var __webpack_exports__ = {};
|
|
32
|
+
// ESM COMPAT FLAG
|
|
33
|
+
__webpack_require__.r(__webpack_exports__);
|
|
34
|
+
// EXPORTS
|
|
35
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
36
|
+
pluginVue: ()=>/* binding */ pluginVue,
|
|
37
|
+
PLUGIN_VUE_NAME: ()=>/* binding */ PLUGIN_VUE_NAME
|
|
35
38
|
});
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
if (options.vue) {
|
|
56
|
-
extraGroups.vue = {
|
|
57
|
-
name: "lib-vue",
|
|
58
|
-
test: /node_modules[\\/](?:vue|vue-loader|@vue[\\/]shared|@vue[\\/]reactivity|@vue[\\/]runtime-dom|@vue[\\/]runtime-core)[\\/]/,
|
|
59
|
-
priority: 0
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
if (options.router) {
|
|
63
|
-
extraGroups.router = {
|
|
64
|
-
name: "lib-router",
|
|
65
|
-
test: /node_modules[\\/]vue-router[\\/]/,
|
|
66
|
-
priority: 0
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
if (!Object.keys(extraGroups).length) {
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
chain.optimization.splitChunks({
|
|
73
|
-
...currentConfig,
|
|
74
|
-
cacheGroups: {
|
|
75
|
-
...currentConfig.cacheGroups,
|
|
76
|
-
...extraGroups
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
});
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
// src/index.ts
|
|
83
|
-
var PLUGIN_VUE_NAME = "rsbuild:vue";
|
|
84
|
-
function pluginVue(options = {}) {
|
|
85
|
-
return {
|
|
86
|
-
name: PLUGIN_VUE_NAME,
|
|
87
|
-
setup(api) {
|
|
88
|
-
const VUE_REGEXP = /\.vue$/;
|
|
89
|
-
const CSS_MODULES_REGEX = /\.modules?\.\w+$/i;
|
|
90
|
-
api.modifyEnvironmentConfig((config, { mergeEnvironmentConfig }) => {
|
|
91
|
-
const extraConfig = {
|
|
92
|
-
source: {
|
|
93
|
-
define: {
|
|
94
|
-
// https://link.vuejs.org/feature-flags
|
|
95
|
-
__VUE_OPTIONS_API__: true,
|
|
96
|
-
__VUE_PROD_DEVTOOLS__: false,
|
|
97
|
-
__VUE_PROD_HYDRATION_MISMATCH_DETAILS__: false
|
|
98
|
-
}
|
|
99
|
-
}
|
|
39
|
+
const external_node_module_namespaceObject = require("node:module");
|
|
40
|
+
const external_vue_loader_namespaceObject = require("vue-loader");
|
|
41
|
+
const isPlainObject = (obj)=>null !== obj && 'object' == typeof obj && '[object Object]' === Object.prototype.toString.call(obj);
|
|
42
|
+
const applySplitChunksRule = function(api) {
|
|
43
|
+
let options = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {
|
|
44
|
+
vue: true,
|
|
45
|
+
router: true
|
|
46
|
+
};
|
|
47
|
+
api.modifyBundlerChain((chain, param)=>{
|
|
48
|
+
let { environment } = param;
|
|
49
|
+
const { config } = environment;
|
|
50
|
+
if ('split-by-experience' !== config.performance.chunkSplit.strategy) return;
|
|
51
|
+
const currentConfig = chain.optimization.splitChunks.values();
|
|
52
|
+
if (!isPlainObject(currentConfig)) return;
|
|
53
|
+
const extraGroups = {};
|
|
54
|
+
if (options.vue) extraGroups.vue = {
|
|
55
|
+
name: 'lib-vue',
|
|
56
|
+
test: /node_modules[\\/](?:vue|vue-loader|@vue[\\/]shared|@vue[\\/]reactivity|@vue[\\/]runtime-dom|@vue[\\/]runtime-core)[\\/]/,
|
|
57
|
+
priority: 0
|
|
100
58
|
};
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
59
|
+
if (options.router) extraGroups.router = {
|
|
60
|
+
name: 'lib-router',
|
|
61
|
+
test: /node_modules[\\/]vue-router[\\/]/,
|
|
62
|
+
priority: 0
|
|
63
|
+
};
|
|
64
|
+
if (!Object.keys(extraGroups).length) return;
|
|
65
|
+
chain.optimization.splitChunks({
|
|
66
|
+
...currentConfig,
|
|
67
|
+
cacheGroups: {
|
|
68
|
+
...currentConfig.cacheGroups,
|
|
69
|
+
...extraGroups
|
|
106
70
|
}
|
|
107
|
-
|
|
108
|
-
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
};
|
|
74
|
+
const src_require = (0, external_node_module_namespaceObject.createRequire)(/*#__PURE__*/ function() {
|
|
75
|
+
return 'undefined' == typeof document ? new (module.require('url'.replace('', ''))).URL('file:' + __filename).href : document.currentScript && document.currentScript.src || new URL('main.js', document.baseURI).href;
|
|
76
|
+
}());
|
|
77
|
+
const PLUGIN_VUE_NAME = 'rsbuild:vue';
|
|
78
|
+
function pluginVue() {
|
|
79
|
+
let options = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
|
|
80
|
+
return {
|
|
81
|
+
name: PLUGIN_VUE_NAME,
|
|
82
|
+
setup (api) {
|
|
83
|
+
const VUE_REGEXP = /\.vue$/;
|
|
84
|
+
const CSS_MODULES_REGEX = /\.modules?\.\w+$/i;
|
|
85
|
+
api.modifyEnvironmentConfig((config, param)=>{
|
|
86
|
+
let { mergeEnvironmentConfig } = param;
|
|
87
|
+
const extraConfig = {
|
|
88
|
+
source: {
|
|
89
|
+
define: {
|
|
90
|
+
// https://link.vuejs.org/feature-flags
|
|
91
|
+
__VUE_OPTIONS_API__: true,
|
|
92
|
+
__VUE_PROD_DEVTOOLS__: false,
|
|
93
|
+
__VUE_PROD_HYDRATION_MISMATCH_DETAILS__: false
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
const merged = mergeEnvironmentConfig(extraConfig, config);
|
|
98
|
+
// Support `<style module>` in Vue SFC
|
|
99
|
+
if (true === merged.output.cssModules.auto) merged.output.cssModules.auto = (path, query)=>{
|
|
100
|
+
if (VUE_REGEXP.test(path)) return query.includes('type=style') && query.includes('module=true');
|
|
101
|
+
return CSS_MODULES_REGEX.test(path);
|
|
102
|
+
};
|
|
103
|
+
return merged;
|
|
104
|
+
});
|
|
105
|
+
api.modifyBundlerChain(async (chain, param)=>{
|
|
106
|
+
let { CHAIN_ID } = param;
|
|
107
|
+
chain.resolve.extensions.add('.vue');
|
|
108
|
+
const userLoaderOptions = options.vueLoaderOptions ?? {};
|
|
109
|
+
const compilerOptions = {
|
|
110
|
+
preserveWhitespace: false,
|
|
111
|
+
...userLoaderOptions.compilerOptions
|
|
112
|
+
};
|
|
113
|
+
const vueLoaderOptions = {
|
|
114
|
+
experimentalInlineMatchResource: true,
|
|
115
|
+
...userLoaderOptions,
|
|
116
|
+
compilerOptions
|
|
117
|
+
};
|
|
118
|
+
chain.module.rule(CHAIN_ID.RULE.VUE).test(VUE_REGEXP).use(CHAIN_ID.USE.VUE).loader(src_require.resolve('vue-loader')).options(vueLoaderOptions);
|
|
119
|
+
// Support for lang="postcss" and lang="pcss" in SFC
|
|
120
|
+
chain.module.rule(CHAIN_ID.RULE.CSS).test(/\.(?:css|postcss|pcss)$/);
|
|
121
|
+
chain.plugin(CHAIN_ID.PLUGIN.VUE_LOADER_PLUGIN).use(external_vue_loader_namespaceObject.VueLoaderPlugin);
|
|
122
|
+
});
|
|
123
|
+
applySplitChunksRule(api, options.splitChunks);
|
|
109
124
|
}
|
|
110
|
-
|
|
111
|
-
});
|
|
112
|
-
api.modifyBundlerChain(async (chain, { CHAIN_ID }) => {
|
|
113
|
-
chain.resolve.extensions.add(".vue");
|
|
114
|
-
const userLoaderOptions = options.vueLoaderOptions ?? {};
|
|
115
|
-
const compilerOptions = {
|
|
116
|
-
preserveWhitespace: false,
|
|
117
|
-
...userLoaderOptions.compilerOptions
|
|
118
|
-
};
|
|
119
|
-
const vueLoaderOptions = {
|
|
120
|
-
experimentalInlineMatchResource: true,
|
|
121
|
-
...userLoaderOptions,
|
|
122
|
-
compilerOptions
|
|
123
|
-
};
|
|
124
|
-
chain.module.rule(CHAIN_ID.RULE.VUE).test(VUE_REGEXP).use(CHAIN_ID.USE.VUE).loader(require.resolve("vue-loader")).options(vueLoaderOptions);
|
|
125
|
-
chain.module.rule(CHAIN_ID.RULE.CSS).test(/\.(?:css|postcss|pcss)$/);
|
|
126
|
-
chain.plugin(CHAIN_ID.PLUGIN.VUE_LOADER_PLUGIN).use(import_vue_loader.VueLoaderPlugin);
|
|
127
|
-
});
|
|
128
|
-
applySplitChunksRule(api, options.splitChunks);
|
|
129
|
-
}
|
|
130
|
-
};
|
|
125
|
+
};
|
|
131
126
|
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
127
|
+
var __webpack_export_target__ = exports;
|
|
128
|
+
for(var i in __webpack_exports__)__webpack_export_target__[i] = __webpack_exports__[i];
|
|
129
|
+
if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
|
|
130
|
+
value: true
|
|
136
131
|
});
|
package/dist/index.js
CHANGED
|
@@ -1,115 +1,87 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
var isPlainObject = (obj) => obj !== null && typeof obj === "object" && Object.prototype.toString.call(obj) === "[object Object]";
|
|
21
|
-
var applySplitChunksRule = (api, options = {
|
|
22
|
-
vue: true,
|
|
23
|
-
router: true
|
|
24
|
-
}) => {
|
|
25
|
-
api.modifyBundlerChain((chain, { environment }) => {
|
|
26
|
-
const { config } = environment;
|
|
27
|
-
if (config.performance.chunkSplit.strategy !== "split-by-experience") {
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
const currentConfig = chain.optimization.splitChunks.values();
|
|
31
|
-
if (!isPlainObject(currentConfig)) {
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
const extraGroups = {};
|
|
35
|
-
if (options.vue) {
|
|
36
|
-
extraGroups.vue = {
|
|
37
|
-
name: "lib-vue",
|
|
38
|
-
test: /node_modules[\\/](?:vue|vue-loader|@vue[\\/]shared|@vue[\\/]reactivity|@vue[\\/]runtime-dom|@vue[\\/]runtime-core)[\\/]/,
|
|
39
|
-
priority: 0
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
if (options.router) {
|
|
43
|
-
extraGroups.router = {
|
|
44
|
-
name: "lib-router",
|
|
45
|
-
test: /node_modules[\\/]vue-router[\\/]/,
|
|
46
|
-
priority: 0
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
if (!Object.keys(extraGroups).length) {
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
chain.optimization.splitChunks({
|
|
53
|
-
...currentConfig,
|
|
54
|
-
cacheGroups: {
|
|
55
|
-
...currentConfig.cacheGroups,
|
|
56
|
-
...extraGroups
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
// src/index.ts
|
|
63
|
-
var PLUGIN_VUE_NAME = "rsbuild:vue";
|
|
64
|
-
function pluginVue(options = {}) {
|
|
65
|
-
return {
|
|
66
|
-
name: PLUGIN_VUE_NAME,
|
|
67
|
-
setup(api) {
|
|
68
|
-
const VUE_REGEXP = /\.vue$/;
|
|
69
|
-
const CSS_MODULES_REGEX = /\.modules?\.\w+$/i;
|
|
70
|
-
api.modifyEnvironmentConfig((config, { mergeEnvironmentConfig }) => {
|
|
71
|
-
const extraConfig = {
|
|
72
|
-
source: {
|
|
73
|
-
define: {
|
|
74
|
-
// https://link.vuejs.org/feature-flags
|
|
75
|
-
__VUE_OPTIONS_API__: true,
|
|
76
|
-
__VUE_PROD_DEVTOOLS__: false,
|
|
77
|
-
__VUE_PROD_HYDRATION_MISMATCH_DETAILS__: false
|
|
78
|
-
}
|
|
79
|
-
}
|
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE_node_module__ from "node:module";
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE_vue_loader__ from "vue-loader";
|
|
3
|
+
const isPlainObject = (obj)=>null !== obj && 'object' == typeof obj && '[object Object]' === Object.prototype.toString.call(obj);
|
|
4
|
+
const applySplitChunksRule = function(api) {
|
|
5
|
+
let options = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {
|
|
6
|
+
vue: true,
|
|
7
|
+
router: true
|
|
8
|
+
};
|
|
9
|
+
api.modifyBundlerChain((chain, param)=>{
|
|
10
|
+
let { environment } = param;
|
|
11
|
+
const { config } = environment;
|
|
12
|
+
if ('split-by-experience' !== config.performance.chunkSplit.strategy) return;
|
|
13
|
+
const currentConfig = chain.optimization.splitChunks.values();
|
|
14
|
+
if (!isPlainObject(currentConfig)) return;
|
|
15
|
+
const extraGroups = {};
|
|
16
|
+
if (options.vue) extraGroups.vue = {
|
|
17
|
+
name: 'lib-vue',
|
|
18
|
+
test: /node_modules[\\/](?:vue|vue-loader|@vue[\\/]shared|@vue[\\/]reactivity|@vue[\\/]runtime-dom|@vue[\\/]runtime-core)[\\/]/,
|
|
19
|
+
priority: 0
|
|
80
20
|
};
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
21
|
+
if (options.router) extraGroups.router = {
|
|
22
|
+
name: 'lib-router',
|
|
23
|
+
test: /node_modules[\\/]vue-router[\\/]/,
|
|
24
|
+
priority: 0
|
|
25
|
+
};
|
|
26
|
+
if (!Object.keys(extraGroups).length) return;
|
|
27
|
+
chain.optimization.splitChunks({
|
|
28
|
+
...currentConfig,
|
|
29
|
+
cacheGroups: {
|
|
30
|
+
...currentConfig.cacheGroups,
|
|
31
|
+
...extraGroups
|
|
86
32
|
}
|
|
87
|
-
|
|
88
|
-
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
const src_require = (0, __WEBPACK_EXTERNAL_MODULE_node_module__.createRequire)(import.meta.url);
|
|
37
|
+
const PLUGIN_VUE_NAME = 'rsbuild:vue';
|
|
38
|
+
function pluginVue() {
|
|
39
|
+
let options = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
|
|
40
|
+
return {
|
|
41
|
+
name: PLUGIN_VUE_NAME,
|
|
42
|
+
setup (api) {
|
|
43
|
+
const VUE_REGEXP = /\.vue$/;
|
|
44
|
+
const CSS_MODULES_REGEX = /\.modules?\.\w+$/i;
|
|
45
|
+
api.modifyEnvironmentConfig((config, param)=>{
|
|
46
|
+
let { mergeEnvironmentConfig } = param;
|
|
47
|
+
const extraConfig = {
|
|
48
|
+
source: {
|
|
49
|
+
define: {
|
|
50
|
+
// https://link.vuejs.org/feature-flags
|
|
51
|
+
__VUE_OPTIONS_API__: true,
|
|
52
|
+
__VUE_PROD_DEVTOOLS__: false,
|
|
53
|
+
__VUE_PROD_HYDRATION_MISMATCH_DETAILS__: false
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
const merged = mergeEnvironmentConfig(extraConfig, config);
|
|
58
|
+
// Support `<style module>` in Vue SFC
|
|
59
|
+
if (true === merged.output.cssModules.auto) merged.output.cssModules.auto = (path, query)=>{
|
|
60
|
+
if (VUE_REGEXP.test(path)) return query.includes('type=style') && query.includes('module=true');
|
|
61
|
+
return CSS_MODULES_REGEX.test(path);
|
|
62
|
+
};
|
|
63
|
+
return merged;
|
|
64
|
+
});
|
|
65
|
+
api.modifyBundlerChain(async (chain, param)=>{
|
|
66
|
+
let { CHAIN_ID } = param;
|
|
67
|
+
chain.resolve.extensions.add('.vue');
|
|
68
|
+
const userLoaderOptions = options.vueLoaderOptions ?? {};
|
|
69
|
+
const compilerOptions = {
|
|
70
|
+
preserveWhitespace: false,
|
|
71
|
+
...userLoaderOptions.compilerOptions
|
|
72
|
+
};
|
|
73
|
+
const vueLoaderOptions = {
|
|
74
|
+
experimentalInlineMatchResource: true,
|
|
75
|
+
...userLoaderOptions,
|
|
76
|
+
compilerOptions
|
|
77
|
+
};
|
|
78
|
+
chain.module.rule(CHAIN_ID.RULE.VUE).test(VUE_REGEXP).use(CHAIN_ID.USE.VUE).loader(src_require.resolve('vue-loader')).options(vueLoaderOptions);
|
|
79
|
+
// Support for lang="postcss" and lang="pcss" in SFC
|
|
80
|
+
chain.module.rule(CHAIN_ID.RULE.CSS).test(/\.(?:css|postcss|pcss)$/);
|
|
81
|
+
chain.plugin(CHAIN_ID.PLUGIN.VUE_LOADER_PLUGIN).use(__WEBPACK_EXTERNAL_MODULE_vue_loader__.VueLoaderPlugin);
|
|
82
|
+
});
|
|
83
|
+
applySplitChunksRule(api, options.splitChunks);
|
|
89
84
|
}
|
|
90
|
-
|
|
91
|
-
});
|
|
92
|
-
api.modifyBundlerChain(async (chain, { CHAIN_ID }) => {
|
|
93
|
-
chain.resolve.extensions.add(".vue");
|
|
94
|
-
const userLoaderOptions = options.vueLoaderOptions ?? {};
|
|
95
|
-
const compilerOptions = {
|
|
96
|
-
preserveWhitespace: false,
|
|
97
|
-
...userLoaderOptions.compilerOptions
|
|
98
|
-
};
|
|
99
|
-
const vueLoaderOptions = {
|
|
100
|
-
experimentalInlineMatchResource: true,
|
|
101
|
-
...userLoaderOptions,
|
|
102
|
-
compilerOptions
|
|
103
|
-
};
|
|
104
|
-
chain.module.rule(CHAIN_ID.RULE.VUE).test(VUE_REGEXP).use(CHAIN_ID.USE.VUE).loader(__require.resolve("vue-loader")).options(vueLoaderOptions);
|
|
105
|
-
chain.module.rule(CHAIN_ID.RULE.CSS).test(/\.(?:css|postcss|pcss)$/);
|
|
106
|
-
chain.plugin(CHAIN_ID.PLUGIN.VUE_LOADER_PLUGIN).use(VueLoaderPlugin);
|
|
107
|
-
});
|
|
108
|
-
applySplitChunksRule(api, options.splitChunks);
|
|
109
|
-
}
|
|
110
|
-
};
|
|
85
|
+
};
|
|
111
86
|
}
|
|
112
|
-
export {
|
|
113
|
-
PLUGIN_VUE_NAME,
|
|
114
|
-
pluginVue
|
|
115
|
-
};
|
|
87
|
+
export { PLUGIN_VUE_NAME, pluginVue };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/plugin-vue",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Vue 3 plugin of Rsbuild",
|
|
5
5
|
"homepage": "https://rsbuild.dev",
|
|
6
6
|
"repository": {
|
|
@@ -12,26 +12,25 @@
|
|
|
12
12
|
"type": "module",
|
|
13
13
|
"exports": {
|
|
14
14
|
".": {
|
|
15
|
-
"types": "./dist
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
16
|
"import": "./dist/index.js",
|
|
17
17
|
"require": "./dist/index.cjs"
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
"main": "./dist/index.cjs",
|
|
21
|
-
"types": "./dist
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
22
|
"files": [
|
|
23
|
-
"dist"
|
|
24
|
-
"dist-types"
|
|
23
|
+
"dist"
|
|
25
24
|
],
|
|
26
25
|
"dependencies": {
|
|
27
26
|
"vue-loader": "^17.4.2",
|
|
28
|
-
"webpack": "^5.
|
|
27
|
+
"webpack": "^5.95.0"
|
|
29
28
|
},
|
|
30
29
|
"devDependencies": {
|
|
31
|
-
"typescript": "^5.
|
|
32
|
-
"vue": "^3.5.
|
|
33
|
-
"webpack": "^5.
|
|
34
|
-
"@rsbuild/core": "1.0.
|
|
30
|
+
"typescript": "^5.6.3",
|
|
31
|
+
"vue": "^3.5.12",
|
|
32
|
+
"webpack": "^5.95.0",
|
|
33
|
+
"@rsbuild/core": "1.0.14",
|
|
35
34
|
"@scripts/test-helper": "1.0.1"
|
|
36
35
|
},
|
|
37
36
|
"peerDependencies": {
|
|
@@ -43,7 +42,7 @@
|
|
|
43
42
|
"registry": "https://registry.npmjs.org/"
|
|
44
43
|
},
|
|
45
44
|
"scripts": {
|
|
46
|
-
"build": "
|
|
47
|
-
"dev": "
|
|
45
|
+
"build": "rslib build",
|
|
46
|
+
"dev": "rslib build --watch"
|
|
48
47
|
}
|
|
49
48
|
}
|
package/dist-types/package.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"//":"This file is for making TypeScript work with moduleResolution node16+.","version":"1.0.0"}
|
|
File without changes
|