Total Complexity | 2 |
Complexity/F | 0 |
Lines of Code | 33 |
Function Count | 0 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import "assets/styles/styles.output.css"; |
||
2 | |||
3 | if ("serviceWorker" in navigator && process.env.NODE_ENV === "production") { |
||
4 | navigator.serviceWorker |
||
5 | .register("./serviceWorker.js", { scope: "/modular/" }) |
||
6 | .then( |
||
7 | function () { |
||
8 | console.log("Service worker registration succeeded"); |
||
9 | }, |
||
10 | /*catch*/ function () { |
||
11 | console.log("Service worker registration failed"); |
||
12 | } |
||
13 | ); |
||
14 | } else { |
||
15 | console.log("Service workers are not supported."); |
||
16 | } |
||
17 | |||
18 | import("modular-preview").then(({ initApplication }) => { |
||
19 | import("engine.config").then(({ default: engine }) => { |
||
20 | initApplication({ |
||
21 | engine, |
||
22 | onComplete: (App) => { |
||
23 | import("react-dom").then(({ render }) => { |
||
24 | render(App, document.getElementById("root"), () => { |
||
25 | let Preloader = document.getElementById("preloader"); |
||
26 | if (Preloader) Preloader.style.visibility = "hidden"; |
||
27 | }); |
||
28 | }); |
||
29 | }, |
||
30 | }); |
||
31 | }); |
||
32 | }); |
||
33 |