@douyinfe/semi-webpack-plugin 2.88.0-beta.1 → 2.88.1

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.
@@ -5,7 +5,7 @@
5
5
  * @description
6
6
  * 此 loader 用于从 css-loader 处理后的 js 代码中获取纯 css 样式字符串
7
7
  * source 是经过 css-loader 处理后的 js 代码。要获取其中的 css 样式字符串,需经过如下操作:
8
- * 1. 通过识别module.id, "做为开头,", ""]);作为结尾拿到中间的 css 代码
8
+ * 1. 通过识别module.id, "或者module.id, `做为开头,", ""]);或者`, ""]);做为结尾拿到中间的 css 代码
9
9
  * 2. 将 文本中的 \n 替换为空字符串
10
10
  */
11
11
  export default function semiExtractCssContentLoader(source: string): string;
@@ -6,20 +6,20 @@
6
6
  * @description
7
7
  * 此 loader 用于从 css-loader 处理后的 js 代码中获取纯 css 样式字符串
8
8
  * source 是经过 css-loader 处理后的 js 代码。要获取其中的 css 样式字符串,需经过如下操作:
9
- * 1. 通过识别module.id, "做为开头,", ""]);作为结尾拿到中间的 css 代码
9
+ * 1. 通过识别module.id, "或者module.id, `做为开头,", ""]);或者`, ""]);做为结尾拿到中间的 css 代码
10
10
  * 2. 将 文本中的 \n 替换为空字符串
11
11
  */
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  function semiExtractCssContentLoader(source) {
14
- const beginContent = 'module.id, "';
15
- const endContent = '", ""]);';
14
+ const beginContent = 'module.id, ';
15
+ const endContent = ', ""]);';
16
16
  let begInIndex = source.indexOf(beginContent);
17
17
  let endIndex = source.length;
18
18
  let result = source;
19
19
  if (begInIndex !== -1) {
20
20
  endIndex = source.lastIndexOf(endContent);
21
21
  if (endIndex !== -1) {
22
- result = source.slice(begInIndex + beginContent.length, endIndex);
22
+ result = source.slice(begInIndex + beginContent.length + 1, endIndex - 1);
23
23
  result = result.replace(/\\n/g, "");
24
24
  }
25
25
  }
@@ -1 +1 @@
1
- {"version":3,"file":"semi-extract-css-content-loader.js","sourceRoot":"","sources":["../src/semi-extract-css-content-loader.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;AAEH,SAAwB,2BAA2B,CAAC,MAAc;IAC9D,MAAM,YAAY,GAAG,cAAc,CAAC;IACpC,MAAM,UAAU,GAAG,UAAU,CAAC;IAC9B,IAAI,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IAC9C,IAAI,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC;IAC7B,IAAI,MAAM,GAAG,MAAM,CAAC;IACpB,IAAI,UAAU,KAAK,CAAC,CAAC,EAAE;QACnB,QAAQ,GAAG,MAAM,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;QAC1C,IAAI,QAAQ,KAAK,CAAC,CAAC,EAAE;YACjB,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,UAAU,GAAG,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;YAClE,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;SACvC;KACJ;IACD,OAAO,MAAM,CAAC;AAClB,CAAC;AAdD,8CAcC"}
1
+ {"version":3,"file":"semi-extract-css-content-loader.js","sourceRoot":"","sources":["../src/semi-extract-css-content-loader.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;AAEH,SAAwB,2BAA2B,CAAC,MAAc;IAC9D,MAAM,YAAY,GAAG,aAAa,CAAC;IACnC,MAAM,UAAU,GAAG,SAAS,CAAC;IAC7B,IAAI,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IAC9C,IAAI,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC;IAC7B,IAAI,MAAM,GAAG,MAAM,CAAC;IACpB,IAAI,UAAU,KAAK,CAAC,CAAC,EAAE;QACnB,QAAQ,GAAG,MAAM,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;QAC1C,IAAI,QAAQ,KAAK,CAAC,CAAC,EAAE;YACjB,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,UAAU,GAAG,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE,QAAQ,GAAG,CAAC,CAAC,CAAC;YAC1E,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;SACvC;KACJ;IACD,OAAO,MAAM,CAAC;AAClB,CAAC;AAdD,8CAcC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@douyinfe/semi-webpack-plugin",
3
- "version": "2.88.0-beta.1",
3
+ "version": "2.88.1",
4
4
  "description": "",
5
5
  "author": "伍浩威 <wuhaowei.whw@bytedance.com>",
6
6
  "homepage": "",
@@ -38,5 +38,5 @@
38
38
  "rimraf": "^3.0.2",
39
39
  "typescript": "^4"
40
40
  },
41
- "gitHead": "535d287af36ed4082c64fe4e8c65f7f2df316dad"
41
+ "gitHead": "e08d049ae7cbf936679b53146fd9041577c9422b"
42
42
  }