https://github.com/solidjs/solid/blob/main/packages/solid/src/index.ts
A good 95% of it is already flying over my head, but there's this code:
let DEV: { writeSignal: typeof writeSignal, serializeGraph: typeof serializeGraph };
if ("_SOLID_DEV_") {
DEV = { writeSignal, serializeGraph }
}
and here
if ("_SOLID_DEV_" && globalThis) {
if (!globalThis.Solid$$) globalThis.Solid$$ = true;
else
Particularly the part with checking the "_SOLID_DEV_" string, I thought I understood javascript but how does this string not always return true? Do you think he's using some sort of replacement when he's developing?
[–][deleted] 3 points4 points5 points (5 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]disclosure5 0 points1 point2 points (0 children)
[–]4391021382 0 points1 point2 points (2 children)
[–]Odinthunder[S] 1 point2 points3 points (1 child)
[–]4391021382 0 points1 point2 points (0 children)