Simon Gardling 1bd2f919a8 init
2022-02-10 17:44:29 -05:00

21 lines
503 B
JavaScript

init();
async function init() {
if (typeof process == "object") {
const [{Chart}, {main, setup}] = await Promise.all([
import("integral_site"),
import("./index.js"),
]);
setup(Chart);
main();
} else {
const [{Chart, default: init}, {main, setup}] = await Promise.all([
import("../pkg/integral_site.js"),
import("./index.js"),
]);
await init();
setup(Chart);
main();
}
}