hanvalen
minified UI library package code calling undefined map
Hi,
I have a lot of apps I want to make this year, so figured I should make a UI library for myself so I don't have to make a button or footer or what have you for each app.
I am pretty good at the computer, so not daunted, but I'm getting this issue I can't quite figure out on my own and jippity is not helping lol.
Basically, I wrote some UI components using tailwind styles, eg:
This is just a lil guy that puts some text in a box for use in Heroes and Product Cards and such.
I got the thing built, doin all the umd.js and es.js stuff, types are compiling, I get my intellisense in VS Code to import the stuff, but the lib.es.js file is like... broken? I guess?
In the dist code, there's a function like
Where
p
is an alias for the sharedConfig
from solid-js
- at run time, p.registry
is undefined, so I'm calling .get()
on undefined
, which suuuucks.
Idk why the lib.es.js is doing this, and to be completely honest this may be more of a vite thing than a solid thing, but if anyone else has done something similar and seen this before I would have approximately infinite high fives for such a person
Another important detail may be that the consuming project is solid start
- these metaframeworks are really important for doing SEO and SEO is an important part of lobster-trap apps so
TLDR;
Working on a UI library, can't use/test it because of weirdness in minified dist code9 replies