We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4728fc1 commit 6385defCopy full SHA for 6385def
1 file changed
packages/vite-plugin/src/index.ts
@@ -73,7 +73,11 @@ const sentryUnplugin = sentryUnpluginFactory({
73
bundleSizeOptimizationsPlugin: viteBundleSizeOptimizationsPlugin,
74
});
75
76
-export const sentryVitePlugin: (options?: Options) => VitePlugin[] = sentryUnplugin.vite;
+export const sentryVitePlugin = (options?: Options): VitePlugin[] => {
77
+ const result = sentryUnplugin.vite(options);
78
+ // unplugin returns a single plugin instead of an array when only one plugin is created, so we normalize this here.
79
+ return Array.isArray(result) ? result : [result];
80
+};
81
82
export type { Options as SentryVitePluginOptions } from "@sentry/bundler-plugin-core";
83
export { sentryCliBinaryExists } from "@sentry/bundler-plugin-core";
0 commit comments