We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
version
1 parent cc1f8ee commit 871ed73Copy full SHA for 871ed73
1 file changed
packages/vite-plugin/src/index.ts
@@ -1,10 +1,11 @@
1
import { SentryRollupPluginOptions } from "@sentry/rollup-plugin";
2
import { _rollupPluginInternal } from "@sentry/rollup-plugin";
3
-import { Plugin, version } from "vite";
+import vite, { Plugin } from "vite";
4
5
function getViteMajorVersion(): string | undefined {
6
try {
7
- return version?.split(".")[0];
+ // The version export was only added in Vite v3?
8
+ return vite?.version?.split(".")[0];
9
} catch (err) {
10
// do nothing, we'll just not report a version
11
}
0 commit comments