@lark-apaas/fullstack-rspack-preset 1.0.34-beta.3 → 1.0.34-beta.6

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.
@@ -12,7 +12,9 @@ class SlardarPerformanceMonitorPlugin {
12
12
  let HtmlPlugin;
13
13
  try {
14
14
  // 尝试从 compiler 中获取 rspack
15
- const rspack = compiler.webpack || compiler.rspack || compiler.constructor.webpack;
15
+ const rspack = compiler.webpack ||
16
+ compiler.rspack ||
17
+ compiler.constructor.webpack;
16
18
  if (rspack && rspack.HtmlRspackPlugin) {
17
19
  HtmlPlugin = rspack.HtmlRspackPlugin;
18
20
  }
@@ -34,10 +36,11 @@ class SlardarPerformanceMonitorPlugin {
34
36
  const hooks = HtmlPlugin.getHooks(compilation);
35
37
  // 使用 alterAssetTagGroups 钩子,在标签数组层面操作
36
38
  hooks.alterAssetTagGroups.tap('SlardarPerformanceMonitorPlugin', (data) => {
37
- const snippet = this.options.snippet ?? getSlardarScriptContent({
38
- bid: this.options.bid,
39
- globalName: this.options.globalName,
40
- });
39
+ const snippet = this.options.snippet ??
40
+ getSlardarScriptContent({
41
+ bid: this.options.bid,
42
+ globalName: this.options.globalName,
43
+ });
41
44
  const teaSnippet = getTeaScriptContent();
42
45
  if (!snippet) {
43
46
  return data;
@@ -88,7 +91,7 @@ class SlardarPerformanceMonitorPlugin {
88
91
  }
89
92
  exports.default = SlardarPerformanceMonitorPlugin;
90
93
  function getSlardarScriptContent(option = {}) {
91
- const bid = option.bid || 'apaas_ai';
94
+ const bid = option.bid || 'apaas_miaoda';
92
95
  const globalName = option.globalName || 'KSlardarWeb';
93
96
  return [
94
97
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lark-apaas/fullstack-rspack-preset",
3
- "version": "1.0.34-beta.3",
3
+ "version": "1.0.34-beta.6",
4
4
  "files": [
5
5
  "lib",
6
6
  "patches",
@@ -37,6 +37,7 @@
37
37
  "@lark-apaas/styled-jsx": "1.0.0-beta.2",
38
38
  "@rspack/plugin-react-refresh": "^1.5.1",
39
39
  "@swc/plugin-styled-jsx": "^11.0.0",
40
+ "babel-loader": "^10.0.0",
40
41
  "clsx": "^2.1.1",
41
42
  "colorjs.io": "^0.5.2",
42
43
  "dotenv": "^16.4.5",