mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 11:01:15 +00:00
feat(editor): Add vue-scan for frontend performance tracking (no-changelog) (#16995)
This commit is contained in:
@@ -25,6 +25,8 @@ import { createPinia, PiniaVuePlugin } from 'pinia';
|
||||
import { ChartJSPlugin } from '@/plugins/chartjs';
|
||||
import { SentryPlugin } from '@/plugins/sentry';
|
||||
|
||||
import type { VueScanOptions } from 'z-vue-scan';
|
||||
|
||||
const pinia = createPinia();
|
||||
|
||||
const app = createApp(App);
|
||||
@@ -40,6 +42,13 @@ app.use(router);
|
||||
app.use(i18nInstance);
|
||||
app.use(ChartJSPlugin);
|
||||
|
||||
if (import.meta.env.VUE_SCAN) {
|
||||
const { default: VueScan } = await import('z-vue-scan');
|
||||
app.use<VueScanOptions>(VueScan, {
|
||||
enable: true,
|
||||
});
|
||||
}
|
||||
|
||||
app.mount('#app');
|
||||
|
||||
if (!import.meta.env.PROD) {
|
||||
|
||||
1
packages/frontend/editor-ui/src/shims.d.ts
vendored
1
packages/frontend/editor-ui/src/shims.d.ts
vendored
@@ -14,6 +14,7 @@ declare global {
|
||||
PROD: boolean;
|
||||
NODE_ENV: 'development' | 'production';
|
||||
VUE_APP_URL_BASE_API: string;
|
||||
VUE_SCAN: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user