lion icon indicating copy to clipboard operation
lion copied to clipboard

[form-core][input-tel] Static class fields usage makes lion load fail through unpkg

Open alangdm opened this issue 2 years ago • 1 comments

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 👍

alangdm avatar Apr 22 '22 07:04 alangdm

Related: https://github.com/mjackson/unpkg/pull/304

alangdm avatar Apr 28 '22 03:04 alangdm