2019-06-23 03:35:23 -07:00
|
|
|
// The Vue build version to load with the `import` command
|
|
|
|
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
|
|
|
|
import Vue from 'vue';
|
|
|
|
|
2021-08-29 04:36:17 -07:00
|
|
|
import './plugins';
|
2019-09-11 01:59:50 -07:00
|
|
|
import 'prismjs';
|
|
|
|
import 'prismjs/themes/prism.css';
|
|
|
|
import 'vue-prism-editor/dist/VuePrismEditor.css';
|
2020-12-18 09:55:53 -08:00
|
|
|
import 'vue-json-pretty/lib/styles.css';
|
2019-06-23 03:35:23 -07:00
|
|
|
import './n8n-theme.scss';
|
|
|
|
|
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-01-19 14:48:30 -08:00
|
|
|
import { runExternalHook } from './components/mixins/externalHooks';
|
2021-10-18 20:57:49 -07:00
|
|
|
import { TelemetryPlugin } from './plugins/telemetry';
|
2021-11-09 00:59:48 -08:00
|
|
|
import { i18n } from './i18n';
|
2021-01-19 14:48:30 -08:00
|
|
|
|
2019-06-23 03:35:23 -07:00
|
|
|
import { store } from './store';
|
2020-10-23 04:44:34 -07:00
|
|
|
|
2019-06-23 03:35:23 -07:00
|
|
|
Vue.config.productionTip = false;
|
2021-01-19 14:48:30 -08:00
|
|
|
router.afterEach((to, from) => {
|
|
|
|
runExternalHook('main.routeChange', store, { from, to });
|
|
|
|
});
|
2019-06-23 03:35:23 -07:00
|
|
|
|
2021-10-18 20:57:49 -07:00
|
|
|
Vue.use(TelemetryPlugin);
|
|
|
|
|
2019-06-23 03:35:23 -07:00
|
|
|
new Vue({
|
|
|
|
router,
|
|
|
|
store,
|
2021-11-09 00:59:48 -08:00
|
|
|
i18n,
|
2019-06-23 03:35:23 -07:00
|
|
|
render: h => h(App),
|
|
|
|
}).$mount('#app');
|
|
|
|
|
|
|
|
if (process.env.NODE_ENV !== 'production') {
|
|
|
|
// Make sure that we get all error messages properly displayed
|
|
|
|
// as long as we are not in production mode
|
|
|
|
window.onerror = (message, source, lineno, colno, error) => {
|
|
|
|
if (message.toString().includes('ResizeObserver')) {
|
|
|
|
// That error can apparently be ignored and can probably
|
|
|
|
// not do anything about it anyway
|
|
|
|
return;
|
|
|
|
}
|
2020-04-05 18:06:00 -07:00
|
|
|
console.error('error caught in main.ts'); // eslint-disable-line no-console
|
2019-09-22 13:03:58 -07:00
|
|
|
console.error(message); // eslint-disable-line no-console
|
|
|
|
console.error(error); // eslint-disable-line no-console
|
2019-06-23 03:35:23 -07:00
|
|
|
};
|
|
|
|
}
|