@tourmind-frontend/monitor-plugin-nuxt 1.0.4 → 1.0.5

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/dist/index.cjs CHANGED
@@ -42,9 +42,7 @@ function MonitorModule(options) {
42
42
  if (!options.uploadUrl) throw new Error(`${LOG_PREFIX} "uploadUrl" is required`);
43
43
  if (!options.branch) throw new Error(`${LOG_PREFIX} "branch" is required`);
44
44
  this.extendBuild((config, { isClient, isDev }) => {
45
- var _a;
46
- const enabled = (_a = options.uploadEnabled) != null ? _a : !isDev;
47
- if (!enabled || !isClient) return;
45
+ if (isDev || !isClient) return;
48
46
  config.devtool = "hidden-source-map";
49
47
  config.plugins = config.plugins || [];
50
48
  config.plugins.push(
@@ -52,9 +50,7 @@ function MonitorModule(options) {
52
50
  url: options.uploadUrl,
53
51
  project: options.project,
54
52
  branch: options.branch,
55
- commit: options.commit,
56
- // 已经在 extendBuild 层 gate 过,跳过 plugin 内部的 mode 判断。
57
- enabled: true
53
+ commit: options.commit
58
54
  })
59
55
  );
60
56
  });
package/dist/index.d.ts CHANGED
@@ -9,8 +9,6 @@ export interface MonitorModuleOptions {
9
9
  branch: string;
10
10
  /** Commit hash,由调用方自行解析(如 `git rev-parse HEAD`)。 */
11
11
  commit?: string;
12
- /** 强制启用 / 禁用 sourcemap 上传。默认仅在生产构建(`!isDev`)时为 `true`。 */
13
- uploadEnabled?: boolean;
14
12
  }
15
13
  interface NuxtBuildContext {
16
14
  isClient: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tourmind-frontend/monitor-plugin-nuxt",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Nuxt 2 module that captures runtime errors and uploads sourcemaps to a frontend-monitor server.",
5
5
  "main": "./dist/index.cjs",
6
6
  "types": "./dist/index.d.ts",
@@ -17,12 +17,12 @@
17
17
  "node": ">=13"
18
18
  },
19
19
  "dependencies": {
20
- "@tourmind-frontend/monitor-plugin-webpack": "^1.0.1"
20
+ "@tourmind-frontend/monitor-plugin-webpack": "^1.0.5"
21
21
  },
22
22
  "peerDependencies": {
23
- "nuxt": ">=2.4.0",
24
- "vue": ">=2.5.0",
25
- "@tourmind-frontend/monitor-tracking": "^1.0.1"
23
+ "nuxt": "^2.4.0",
24
+ "vue": "^2.5.0",
25
+ "@tourmind-frontend/monitor-tracking": "^1.0.5"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@types/node": "^20.0.0",