1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { fetch } from "https://esm.town/v/std/fetch";
import { REACT_DOM_MINIFIED } from "https://esm.town/v/liamdanielduffy/REACT_DOM_MINIFIED";
let { REACT_DOM_MINIFIED_PT4 } = await import("https://esm.town/v/liamdanielduffy/REACT_DOM_MINIFIED_PT4");
let { REACT_DOM_MINIFIED_PT3 } = await import("https://esm.town/v/liamdanielduffy/REACT_DOM_MINIFIED_PT3");
let { REACT_DOM_MINIFIED_PT2 } = await import("https://esm.town/v/liamdanielduffy/REACT_DOM_MINIFIED_PT2");
let { REACT_DOM_MINIFIED_PT1 } = await import("https://esm.town/v/liamdanielduffy/REACT_DOM_MINIFIED_PT1");
export async function buildReactDomMinified() {
const res = await fetch(
"https://unpkg.com/react-dom@18.2.0/umd/react-dom.production.min.js",
);
const src = await res.text();
const pt1End = src.length / 4;
const pt2End = 2 * pt1End;
const pt3End = 3 * pt1End;
const pt4End = src.length;
REACT_DOM_MINIFIED_PT1 = src.substring(0, pt1End);
REACT_DOM_MINIFIED_PT2 = src.substring(pt1End, pt2End);
REACT_DOM_MINIFIED_PT3 = src.substring(pt2End, pt3End);
REACT_DOM_MINIFIED_PT4 = src.substring(pt3End, pt4End);
return REACT_DOM_MINIFIED;
}
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
October 23, 2023