first commit
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
// Load view specific code
|
||||
const currentView = document.body.dataset["currentView"];
|
||||
|
||||
if (currentView) {
|
||||
// Import the module asynchronously; its top-level code runs on load
|
||||
import(`./views/${currentView}.ts`)
|
||||
// If the module exports an `init` function, call it
|
||||
.then(module => module.init?.())
|
||||
.catch(() => console.warn(`No module for view: ${currentView}`))
|
||||
}
|
||||
Reference in New Issue
Block a user