develop
This commit is contained in:
parent
d76ee19be7
commit
26609eb46c
11 changed files with 251 additions and 70 deletions
|
|
@ -1,13 +1,20 @@
|
|||
frappe.pages["custom_ui"].on_page_load = async (wrapper) => {
|
||||
$(wrapper).html('<div id="custom-ui-app"></div>');
|
||||
console.log("App root div created");
|
||||
|
||||
const script = document.createElement("script");
|
||||
|
||||
manifest = await fetch("/assets/custom_ui/dist/.vite/manifest.json").then((res) => res.json());
|
||||
console.log("Fetched manifest:", manifest);
|
||||
|
||||
const script = document.createElement("script");
|
||||
script.src = "/assets/custom_ui/dist/" + manifest["src/main.js"]["file"];
|
||||
script.type = "module";
|
||||
document.body.appendChild(script);
|
||||
console.log("Appended script:", script.src);
|
||||
|
||||
const link = document.createElement("link");
|
||||
link.rel = "stylesheet";
|
||||
link.href = "/assets/custom_ui/dist/" + manifest["src/main.js"]["css"][0];
|
||||
document.head.appendChild(link);
|
||||
|
||||
console.log("Custom UI stylesheet loaded:", link.href);
|
||||
console.log("Custom UI script loaded:", script.src);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue