lion
lion copied to clipboard
[form-core][input-tel] Static class fields usage makes lion load fail through unpkg
Expected behavior
Loading form-core dependent components through unpkg like below registers the component properly
import "https://unpkg.com/@lion/[email protected]/lion-input.js?module";
Actual Behavior
Apparently, unpkg doesn't support static class fields (static x = 1
), so all form-core dependents fail when loading Validator.js through unpkg
See: https://unpkg.com/@lion/[email protected]/src/validate/Validator.js?module
From what I could tell, only that file and a couple of other files in input-tel
use static fields, so, I think they could easily be replaced with static getters like every other file to preserve backward compatibility for a while until the feature has a slightly better coverage in tools such as unpkg (ironically browser coverage is pretty substantial by this point 🤷 )
I could create a PR for this if you're willing to make the change 👍
Related: https://github.com/mjackson/unpkg/pull/304