Closed yatesco closed 2 years ago
Describe the bug The example from https://millionjs.org/docs/api/extra/morph doesn't work because it cannot find the morph function.
morph
To Reproduce
script
Expected behavior Examples should be copy-and-pasteable ;-)
Additional context Looking at the other extensions, it seems there are additional files that might be needed, so I guessed at the following:
import { m, patch, createElement } from "https://cdn.skypack.dev/million"; import { morph } from "https://cdn.skypack.dev/million/morph"; // GUESS alert("million"); // THIS WORKS const node1 = document.createElement("div"); const node2 = document.createElement("div"); node2.textContent = "Hello World"; morph(node2, node1); // THIS FAILS morph("<div>Goodbye World</div>", node2);
Hey! Sorry for the late response. On this issue now
Fixed in #274
Thanks @aidenybai
Describe the bug The example from https://millionjs.org/docs/api/extra/morph doesn't work because it cannot find the
morph
function.To Reproduce
script
example from https://millionjs.org/docs/installationExpected behavior Examples should be copy-and-pasteable ;-)
Additional context Looking at the other extensions, it seems there are additional files that might be needed, so I guessed at the following: