Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { Store } from "cx/data";
import { Url, History, Widget, startAppLoop } from "cx/ui";
import { Timing, Debug } from "cx/util";
//css
import "./index.scss";
import "cx-theme-aquamarine";
//store
const store = new Store();
//webpack (HMR)
if (module.hot) {
// accept itself
module.hot.accept();
// remember data on dispose
module.hot.dispose(function(data) {
data.state = store.getData();
if (stop) stop();
});
//apply data on hot replace
if (module.hot.data) store.load(module.hot.data.state);
}
import { startHotAppLoop, History } from "cx/ui";
import { Debug } from "cx/util";
import Routes from "./routes";
import "./index.scss";
import { Store } from "cx/data";
const store = new Store();
History.connect(
store,
"url"
);
Debug.enable("app-data");
startHotAppLoop(module, document.getElementById("app"), store, Routes);