miaoda-react-devkit 0.1.1-beta.21 → 0.1.1-beta.22

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.
@@ -1,12 +1,11 @@
1
1
  // cloud/vite.config.ts
2
2
  import * as vite from "vite";
3
3
  import { loadConfigFromFile, mergeConfig } from "vite";
4
- import { withSentryStub, hmrTogglePlugin, extractRouterPlugin } from "../dist/vite/index.js";
4
+ import { hmrTogglePlugin, extractRouterPlugin } from "../dist/vite/index.js";
5
5
  import {
6
6
  makeTagger,
7
7
  injectedGuiListenerPlugin,
8
8
  injectOnErrorPlugin,
9
- monitorPlugin,
10
9
  fontsCodePlugin,
11
10
  mdClickPlugin,
12
11
  patchSupabasePlugins
@@ -44,23 +43,6 @@ if (!hasReact) {
44
43
  }
45
44
  var possibleEntries = ["./src/main.tsx", "./src/main.ts", "./src/index.tsx", "./src/index.ts"];
46
45
  var warmupFiles = possibleEntries.filter((e) => fs.existsSync(path.join(projectRoot, e)));
47
- var SENTRY_IMPORT_RE = /from\s+['"]@sentry\/react['"]/;
48
- function entryHasSentryImport(root, entries) {
49
- for (const entry of entries) {
50
- const fullPath = path.join(root, entry);
51
- if (!fs.existsSync(fullPath)) {
52
- continue;
53
- }
54
- try {
55
- if (SENTRY_IMPORT_RE.test(fs.readFileSync(fullPath, "utf-8"))) {
56
- return true;
57
- }
58
- } catch {
59
- }
60
- }
61
- return false;
62
- }
63
- var hasSentryReact = entryHasSentryImport(projectRoot, possibleEntries);
64
46
  var viteVersionInfo = {
65
47
  version: vite.version,
66
48
  rollupVersion: vite.rollupVersion ?? null,
@@ -69,18 +51,11 @@ var viteVersionInfo = {
69
51
  };
70
52
  var injectedGuiUrl = `https://${cdnHost}/common/v2/${isOnline ? "" : `${env}/`}injected.js`;
71
53
  var cloudPlugins = [
72
- ...hasSentryReact ? [withSentryStub()] : [monitorPlugin({
73
- scriptSrc: `https://${cdnHost}/sentry/browser.sentry.min.js`,
74
- sentryDsn,
75
- environment: miaodaEnv,
76
- appId
77
- })],
78
54
  // web 类型需要 DOM 节点打标(GUI使用)
79
55
  ...appType === "web" ? [
80
56
  makeTagger(),
81
57
  mdClickPlugin({ appType }),
82
- fontsCodePlugin(),
83
- injectedGuiListenerPlugin({ path: injectedGuiUrl })
58
+ fontsCodePlugin()
84
59
  ] : [],
85
60
  injectedGuiListenerPlugin({ path: injectedGuiUrl }),
86
61
  injectOnErrorPlugin(),