init
This commit is contained in:
20
www/bootstrap.js
vendored
Normal file
20
www/bootstrap.js
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user