2019-08-30 20:47:31 +00:00
|
|
|
/* eslint no-console:0 */
|
|
|
|
|
2020-12-07 16:21:46 +00:00
|
|
|
import { Notifier } from '@airbrake/browser'
|
|
|
|
|
2023-06-12 14:20:26 +00:00
|
|
|
try {
|
|
|
|
window.airbrake = new Notifier({
|
|
|
|
projectId: window.env.AIRBRAKE_PROJECT_ID,
|
|
|
|
projectKey: window.env.AIRBRAKE_PROJECT_KEY,
|
|
|
|
host: window.env.PANEL_URL
|
|
|
|
});
|
|
|
|
|
2024-04-30 20:45:33 +00:00
|
|
|
const ignoredErrors = ["htmx:afterRequest", "htmx:sendAbort"];
|
|
|
|
|
2023-06-12 14:20:26 +00:00
|
|
|
console.originalError = console.error;
|
|
|
|
console.error = (...e) => {
|
2024-04-30 20:45:33 +00:00
|
|
|
const msg = e.join(" ");
|
|
|
|
|
|
|
|
if (!ignoredErrors.some(x => msg.includes(x))) {
|
|
|
|
window.airbrake.notify(e.join(" "));
|
|
|
|
}
|
|
|
|
|
2023-06-12 14:20:26 +00:00
|
|
|
return console.originalError(...e);
|
|
|
|
};
|
|
|
|
} catch(e) {
|
|
|
|
console.error(e);
|
|
|
|
}
|
2020-12-07 16:21:46 +00:00
|
|
|
|
2020-11-19 23:35:29 +00:00
|
|
|
import 'core-js/stable'
|
|
|
|
import 'regenerator-runtime/runtime'
|
2020-11-19 23:38:33 +00:00
|
|
|
import 'controllers'
|
2021-02-02 19:05:39 +00:00
|
|
|
import 'editor/editor'
|
2021-04-07 20:45:27 +00:00
|
|
|
import 'fork-awesome/scss/fork-awesome.scss'
|
|
|
|
import 'etc'
|
2020-11-11 19:34:11 +00:00
|
|
|
|
2021-04-07 20:45:27 +00:00
|
|
|
import Rails from '@rails/ujs'
|
|
|
|
import Turbolinks from 'turbolinks'
|
|
|
|
import * as ActiveStorage from '@rails/activestorage'
|
2021-10-08 19:31:02 +00:00
|
|
|
import 'chartkick/chart.js'
|
2020-06-28 00:42:15 +00:00
|
|
|
|
2021-04-07 20:45:27 +00:00
|
|
|
Rails.start()
|
|
|
|
Turbolinks.start()
|
|
|
|
ActiveStorage.start()
|
2024-03-22 21:34:24 +00:00
|
|
|
|
2024-03-22 21:46:21 +00:00
|
|
|
window.htmx = require('htmx.org/dist/htmx.js')
|