@douyinfe/semi-rspack-plugin 2.91.0-beta.0 → 2.91.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 CHANGED
@@ -5,6 +5,9 @@ The plugin is designed for Semi Design, support rspack, provides two major abili
5
5
  - Custom theme
6
6
  - Replace prefix of CSS selector
7
7
 
8
+ > Note: The plugin detects Semi related dependencies by package path. It supports both
9
+ > `@douyinfe/semi-ui` and version-suffixed packages like `@douyinfe/semi-ui-19` (also for `semi-icons`).
10
+
8
11
  ## Usage
9
12
 
10
13
  ### Install
package/lib/rule.js CHANGED
@@ -5,7 +5,8 @@ const constants_1 = require("./constants");
5
5
  const utils_1 = require("./utils");
6
6
  function createSourceSuffixLoaderRule(_opts) {
7
7
  return {
8
- test: /@douyinfe(\/|\\)+semi-(ui|icons)(\/|\\)+.+\.js$/,
8
+ // Support packages like @douyinfe/semi-ui-19, @douyinfe/semi-icons-19
9
+ test: /@douyinfe(\/|\\)+semi-(ui|icons)(-\d+)?(\/|\\)+.+\.js$/,
9
10
  use: [{ loader: constants_1.SOURCE_SUFFIX_LOADER }],
10
11
  };
11
12
  }
@@ -27,7 +28,8 @@ function createThemeLoaderRule(opts) {
27
28
  cssLayer: opts.cssLayer
28
29
  };
29
30
  const loaderInfo = {
30
- test: /@douyinfe(\/|\\)+semi-(ui|icons|foundation)(\/|\\)+lib(\/|\\)+.+\.scss$/,
31
+ // Support packages like @douyinfe/semi-ui-19, @douyinfe/semi-foundation-19
32
+ test: /@douyinfe(\/|\\)+semi-(ui|icons|foundation)(-\d+)?(\/|\\)+lib(\/|\\)+.+\.scss$/,
31
33
  use: [{ loader: constants_1.THEME_LOADER, options }],
32
34
  };
33
35
  let commonLoader = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@douyinfe/semi-rspack-plugin",
3
- "version": "2.91.0-beta.0",
3
+ "version": "2.91.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": "6cea3aca8f98b71f8f47b5583bd240702bbb9c7f"
36
+ "gitHead": "ead51562c1d0499a5fcde1d828d57d3fd3d2b314"
37
37
  }