bigbuffet-rw/app/soapbox/main.js

35 lines
807 B
JavaScript
Raw Normal View History

2020-03-27 13:59:38 -07:00
'use strict';
import './precheck';
2022-03-21 11:09:01 -07:00
// import * as OfflinePluginRuntime from '@lcdp/offline-plugin/runtime';
2020-03-27 13:59:38 -07:00
import React from 'react';
import ReactDOM from 'react-dom';
2022-03-21 11:09:01 -07:00
// import { NODE_ENV } from 'soapbox/build_config';
2022-01-10 14:01:24 -08:00
import { default as Soapbox } from './containers/soapbox';
2021-09-08 13:45:44 -07:00
import * as monitoring from './monitoring';
import * as perf from './performance';
2020-03-27 13:59:38 -07:00
import ready from './ready';
function main() {
perf.start('main()');
2021-09-08 13:45:44 -07:00
// Sentry
monitoring.start();
2020-03-27 13:59:38 -07:00
ready(() => {
2020-05-28 15:52:07 -07:00
const mountNode = document.getElementById('soapbox');
2020-03-27 13:59:38 -07:00
2020-05-28 15:52:07 -07:00
ReactDOM.render(<Soapbox />, mountNode);
2021-09-05 14:42:48 -07:00
2022-03-21 11:09:01 -07:00
// if (NODE_ENV === 'production') {
// // avoid offline in dev mode because it's harder to debug
// OfflinePluginRuntime.install();
// }
2020-03-27 13:59:38 -07:00
perf.stop('main()');
});
}
export default main;