Change `SvelthreeLogger.get_comp_name` to strip more suffixes
vatro opened this issue · comments
After reinstalling modules in the test-scenes project, I started getting e.g. Scene2
as comp.constructor.name
, so the shadow DOM creation logic which relies on the returned logic:
svelthree/src/lib/logic/shared/shadow_dom.ts
Lines 42 to 55 in 132baaf
wasn't returning the correct shadow_dom_el
/ failed.
So, a quick fix would be to change the replace search-string to a RegEx catching any underscores and numbers.
Fun fact: I asked ChatGPT what this kind of RegEx would look like, it gave me: [\d_]/g
.
Atm, the SvelteKit
/ Vite
classes suffixing (if duplicate names) / chunks naming behavior a bit of a black box to me and should be examined / nailed down, see #193