rsbuild-pipe 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/lib/rsbuild.base.config.ts +17 -1
- package/package.json +11 -9
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { mergeRsbuildConfig, type RsbuildConfig } from '@rsbuild/core';
|
|
2
2
|
import { pluginReact, type PluginReactOptions } from '@rsbuild/plugin-react';
|
|
3
3
|
import { pluginSvgr, PluginSvgrOptions } from "@rsbuild/plugin-svgr";
|
|
4
|
+
import { pluginSass, PluginSassOptions } from "@rsbuild/plugin-sass";
|
|
5
|
+
import { pluginLess, PluginLessOptions } from "@rsbuild/plugin-less";
|
|
4
6
|
import { pluginTypeCheck, PluginTypeCheckerOptions } from '@rsbuild/plugin-type-check';
|
|
5
7
|
import { pluginBasicSsl } from '@rsbuild/plugin-basic-ssl';
|
|
6
8
|
|
|
@@ -22,6 +24,10 @@ interface GetBaseConfigParams {
|
|
|
22
24
|
pluginReactOptions?: PluginReactOptions,
|
|
23
25
|
pluginSvgrEnable?: boolean, // 是否使用插件: @rsbuild/plugin-svgr
|
|
24
26
|
pluginSvgrOptions?: PluginSvgrOptions,
|
|
27
|
+
pluginSassEnable?: boolean, // 是否使用插件: @rsbuild/plugin-sass
|
|
28
|
+
pluginSassOptions?: PluginSassOptions,
|
|
29
|
+
pluginLessEnable?: boolean, // 是否使用插件: @rsbuild/plugin-less
|
|
30
|
+
pluginLessOptions?: PluginLessOptions,
|
|
25
31
|
pluginTypeCheckEnable?: boolean, // 是否使用插件: @rsbuild/plugin-type-check
|
|
26
32
|
pluginTypeCheckerOptions?: PluginTypeCheckerOptions,
|
|
27
33
|
};
|
|
@@ -34,6 +40,10 @@ export const getBaseConfig = (params: GetBaseConfigParams = {}):RsbuildConfig =>
|
|
|
34
40
|
pluginReactOptions = {},
|
|
35
41
|
pluginSvgrEnable = true,
|
|
36
42
|
pluginSvgrOptions = {},
|
|
43
|
+
pluginSassEnable = true,
|
|
44
|
+
pluginSassOptions = {},
|
|
45
|
+
pluginLessEnable = true,
|
|
46
|
+
pluginLessOptions = {},
|
|
37
47
|
pluginTypeCheckEnable = true,
|
|
38
48
|
pluginTypeCheckerOptions = {},
|
|
39
49
|
} = params;
|
|
@@ -74,7 +84,7 @@ export const getBaseConfig = (params: GetBaseConfigParams = {}):RsbuildConfig =>
|
|
|
74
84
|
// react插件true
|
|
75
85
|
pluginReactEnable ? pluginReact(pluginReactOptions) : null,
|
|
76
86
|
|
|
77
|
-
// typescript
|
|
87
|
+
// typescript 语法检查,注意语法错误只能在命令行中输出,不能支持less,scss再页面中输出
|
|
78
88
|
pluginTypeCheckEnable ? pluginTypeCheck(deepmerge({
|
|
79
89
|
forkTsCheckerOptions: {
|
|
80
90
|
async: true,
|
|
@@ -90,6 +100,12 @@ export const getBaseConfig = (params: GetBaseConfigParams = {}):RsbuildConfig =>
|
|
|
90
100
|
mixedImport: true,
|
|
91
101
|
}, pluginSvgrOptions)) : null,
|
|
92
102
|
|
|
103
|
+
// 支持sass,scss
|
|
104
|
+
pluginSassEnable ? pluginSass(pluginSassOptions) : null,
|
|
105
|
+
|
|
106
|
+
// 支持less
|
|
107
|
+
pluginLessEnable ? pluginLess(pluginLessOptions) : null,
|
|
108
|
+
|
|
93
109
|
// 是否使用自签名的https证书
|
|
94
110
|
pluginBasicSslEnable ? pluginBasicSsl() : null,
|
|
95
111
|
],
|
package/package.json
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rsbuild-pipe",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"author": "chencheng <daniel_txy@163.com>",
|
|
5
5
|
"description": "rsbuild pipe",
|
|
6
6
|
"main": "index",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@rsbuild/core": "0.
|
|
9
|
-
"@rsbuild/plugin-babel": "0.
|
|
10
|
-
"@rsbuild/plugin-basic-ssl": "0.
|
|
11
|
-
"@rsbuild/plugin-
|
|
12
|
-
"@rsbuild/plugin-
|
|
13
|
-
"@rsbuild/plugin-
|
|
14
|
-
"@rsbuild/plugin-
|
|
15
|
-
"@
|
|
8
|
+
"@rsbuild/core": "0.7.1",
|
|
9
|
+
"@rsbuild/plugin-babel": "0.7.1",
|
|
10
|
+
"@rsbuild/plugin-basic-ssl": "0.7.1",
|
|
11
|
+
"@rsbuild/plugin-less": "0.7.1",
|
|
12
|
+
"@rsbuild/plugin-node-polyfill": "0.7.1",
|
|
13
|
+
"@rsbuild/plugin-react": "0.7.1",
|
|
14
|
+
"@rsbuild/plugin-sass": "0.7.1",
|
|
15
|
+
"@rsbuild/plugin-svgr": "0.7.1",
|
|
16
|
+
"@rsbuild/plugin-type-check": "0.7.1",
|
|
17
|
+
"@types/node": "20.12.13",
|
|
16
18
|
"deepmerge": "4.3.1"
|
|
17
19
|
},
|
|
18
20
|
"repository": {
|