@douyinfe/semi-rspack-plugin 2.63.1 → 2.64.0-beta.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/README.md +9 -9
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -30,12 +30,12 @@ In order to use the npm package, you need to customize the theme through [Semi D
|
|
|
30
30
|
|
|
31
31
|
``` js
|
|
32
32
|
// rspack.config.js
|
|
33
|
-
const
|
|
33
|
+
const {SemiRspackPlugin} = require('@douyinfe/semi-rspack-plugin');
|
|
34
34
|
|
|
35
35
|
module.exports = {
|
|
36
36
|
// ...
|
|
37
37
|
plugins: [
|
|
38
|
-
new
|
|
38
|
+
new SemiRspackPlugin({
|
|
39
39
|
theme: '@douyinfe/semi-theme-default'
|
|
40
40
|
})
|
|
41
41
|
]
|
|
@@ -57,12 +57,12 @@ $font-size-small: 16px;
|
|
|
57
57
|
``` js
|
|
58
58
|
// rspack.config.js
|
|
59
59
|
const path = require('path');
|
|
60
|
-
const
|
|
60
|
+
const {SemiRspackPlugin} = require('@douyinfe/semi-rspack-plugin');
|
|
61
61
|
|
|
62
62
|
module.exports = {
|
|
63
63
|
// ...
|
|
64
64
|
plugins: [
|
|
65
|
-
new
|
|
65
|
+
new SemiRspackPlugin({
|
|
66
66
|
include: path.join(__dirname, 'local.scss')
|
|
67
67
|
})
|
|
68
68
|
]
|
|
@@ -72,12 +72,12 @@ module.exports = {
|
|
|
72
72
|
#### Through parameters
|
|
73
73
|
``` js
|
|
74
74
|
// rspack.config.js
|
|
75
|
-
const
|
|
75
|
+
const {SemiRspackPlugin} = require('@douyinfe/semi-rspack-plugin');
|
|
76
76
|
|
|
77
77
|
module.exports = {
|
|
78
78
|
// ...
|
|
79
79
|
plugins: [
|
|
80
|
-
new
|
|
80
|
+
new SemiRspackPlugin({
|
|
81
81
|
variables: {
|
|
82
82
|
"$font-size-small": '16px'
|
|
83
83
|
}
|
|
@@ -91,12 +91,12 @@ The CSS selectors used by Semi Design is prefixed with semi by default(e.g, `.se
|
|
|
91
91
|
|
|
92
92
|
``` js
|
|
93
93
|
// rspack.config.js
|
|
94
|
-
const
|
|
94
|
+
const {SemiRspackPlugin} = require('@douyinfe/semi-rspack-plugin');
|
|
95
95
|
|
|
96
96
|
module.exports = {
|
|
97
97
|
// ...
|
|
98
98
|
plugins: [
|
|
99
|
-
new
|
|
99
|
+
new SemiRspackPlugin({
|
|
100
100
|
prefixCls: 'custom'
|
|
101
101
|
})
|
|
102
102
|
]
|
|
@@ -163,4 +163,4 @@ Type: `(loaderList:any[])=>any[]`
|
|
|
163
163
|
You can customize how webpack process semi related styles by override the loader with this option. The function will receive the loader list of default loaders(include options.extractCssOptions) and you should return your new loader list. The best practice is just only add your loader to the list rather than delete or change the default loaders since some core logic is in there.
|
|
164
164
|
|
|
165
165
|
|
|
166
|
-
In webpack@5, some hooks need to be obtained through api `NormalModule.getCompilationHooks`. But in some scenarios, webpack will not be installed, such as Next.js. Therefore, the user is required to pass in NormalModule as a parameter.
|
|
166
|
+
In webpack@5, some hooks need to be obtained through api `NormalModule.getCompilationHooks`. But in some scenarios, webpack will not be installed, such as Next.js. Therefore, the user is required to pass in NormalModule as a parameter.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-rspack-plugin",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.64.0-beta.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"homepage": "",
|
|
6
6
|
"license": "MIT",
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"typescript": "^4",
|
|
34
34
|
"webpack": "^5.77.0"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "57ca3b4704969aa7ea94d4b1ec7d45024ecd61d6"
|
|
37
37
|
}
|