2023-07-28 00:51:07 -07:00
|
|
|
import { createApp } from 'vue';
|
2019-06-23 03:35:23 -07:00
|
|
|
|
2024-05-23 01:42:10 -07:00
|
|
|
import '@vue-flow/core/dist/style.css';
|
|
|
|
import '@vue-flow/core/dist/theme-default.css';
|
|
|
|
import '@vue-flow/controls/dist/style.css';
|
|
|
|
import '@vue-flow/minimap/dist/style.css';
|
2024-07-15 03:00:52 -07:00
|
|
|
import '@vue-flow/node-resizer/dist/style.css';
|
2024-05-23 01:42:10 -07:00
|
|
|
|
2020-12-18 09:55:53 -08:00
|
|
|
import 'vue-json-pretty/lib/styles.css';
|
2023-01-30 09:20:50 -08:00
|
|
|
import '@jsplumb/browser-ui/css/jsplumbtoolkit.css';
|
2022-09-23 07:14:28 -07:00
|
|
|
import 'n8n-design-system/css/index.scss';
|
2024-05-14 08:20:31 -07:00
|
|
|
// import 'n8n-design-system/css/tailwind/index.css';
|
2023-04-26 00:18:10 -07:00
|
|
|
|
2023-06-16 00:30:57 -07:00
|
|
|
import './n8n-theme.scss';
|
2019-06-23 03:35:23 -07:00
|
|
|
|
2021-09-21 05:35:55 -07:00
|
|
|
import '@fontsource/open-sans/latin-400.css';
|
|
|
|
import '@fontsource/open-sans/latin-600.css';
|
|
|
|
import '@fontsource/open-sans/latin-700.css';
|
|
|
|
|
2019-06-23 03:35:23 -07:00
|
|
|
import App from '@/App.vue';
|
|
|
|
import router from './router';
|
|
|
|
|
2021-10-18 20:57:49 -07:00
|
|
|
import { TelemetryPlugin } from './plugins/telemetry';
|
2022-09-05 07:36:22 -07:00
|
|
|
import { I18nPlugin, i18nInstance } from './plugins/i18n';
|
2023-06-16 00:30:57 -07:00
|
|
|
import { GlobalComponentsPlugin } from './plugins/components';
|
|
|
|
import { GlobalDirectivesPlugin } from './plugins/directives';
|
|
|
|
import { FontAwesomePlugin } from './plugins/icons';
|
2021-01-19 14:48:30 -08:00
|
|
|
|
2022-11-04 06:04:31 -07:00
|
|
|
import { createPinia, PiniaVuePlugin } from 'pinia';
|
2023-10-02 08:33:43 -07:00
|
|
|
import { JsPlumbPlugin } from '@/plugins/jsplumb';
|
2023-11-10 14:48:31 -08:00
|
|
|
import { ChartJSPlugin } from '@/plugins/chartjs';
|
2020-10-23 04:44:34 -07:00
|
|
|
|
2023-07-28 00:51:07 -07:00
|
|
|
const pinia = createPinia();
|
2022-11-04 06:04:31 -07:00
|
|
|
|
2023-07-28 00:51:07 -07:00
|
|
|
const app = createApp(App);
|
2023-06-16 00:30:57 -07:00
|
|
|
|
2023-07-28 00:51:07 -07:00
|
|
|
app.use(TelemetryPlugin);
|
|
|
|
app.use(PiniaVuePlugin);
|
|
|
|
app.use(I18nPlugin);
|
|
|
|
app.use(FontAwesomePlugin);
|
|
|
|
app.use(GlobalComponentsPlugin);
|
|
|
|
app.use(GlobalDirectivesPlugin);
|
2023-10-02 08:33:43 -07:00
|
|
|
app.use(JsPlumbPlugin);
|
2023-07-28 00:51:07 -07:00
|
|
|
app.use(pinia);
|
|
|
|
app.use(router);
|
|
|
|
app.use(i18nInstance);
|
2023-11-10 14:48:31 -08:00
|
|
|
app.use(ChartJSPlugin);
|
2021-10-18 20:57:49 -07:00
|
|
|
|
2023-07-28 00:51:07 -07:00
|
|
|
app.mount('#app');
|
2019-06-23 03:35:23 -07:00
|
|
|
|
2023-01-11 13:22:12 -08:00
|
|
|
if (!import.meta.env.PROD) {
|
2019-06-23 03:35:23 -07:00
|
|
|
// Make sure that we get all error messages properly displayed
|
|
|
|
// as long as we are not in production mode
|
2024-06-10 06:23:06 -07:00
|
|
|
window.onerror = (message, _source, _lineno, _colno, error) => {
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-base-to-string
|
2019-06-23 03:35:23 -07:00
|
|
|
if (message.toString().includes('ResizeObserver')) {
|
|
|
|
// That error can apparently be ignored and can probably
|
|
|
|
// not do anything about it anyway
|
|
|
|
return;
|
|
|
|
}
|
2023-08-01 04:47:55 -07:00
|
|
|
console.error('error caught in main.ts');
|
|
|
|
console.error(message);
|
|
|
|
console.error(error);
|
2019-06-23 03:35:23 -07:00
|
|
|
};
|
|
|
|
}
|