feat: add @web/chart to loader (by AI)
This commit is contained in:
commit
cef9ba28d3
18
loader.js
Normal file
18
loader.js
Normal file
@ -0,0 +1,18 @@
|
||||
(function () {
|
||||
const currentUrl = document.currentScript.src;
|
||||
const baseUrl = currentUrl.substring(0, currentUrl.lastIndexOf('/') + 1);
|
||||
const importMap = {
|
||||
imports: {
|
||||
"@web/state": baseUrl + "state.mjs",
|
||||
"@web/base": baseUrl + "base.mjs",
|
||||
"@web/mindmap": baseUrl + "mindmap.js",
|
||||
"@web/kanban": baseUrl + "kanban.js",
|
||||
"@web/chart": baseUrl + "chart.js",
|
||||
}
|
||||
};
|
||||
|
||||
const script = document.createElement('script');
|
||||
script.type = 'importmap';
|
||||
script.textContent = JSON.stringify(importMap);
|
||||
document.currentScript.parentNode.insertBefore(script, document.currentScript);
|
||||
})();
|
||||
Loading…
x
Reference in New Issue
Block a user