Closed dios-david closed 6 years ago
@dios-david Have you tried Parcel 1.10.0?
This is not HyperHTMLHElement related issue, it's a transpiler one.
Be sure you are using latest Babel, be sure you are targeting the right browsers, be sure your bundler understand classes properly 'cause you gonna have problems with every other native extend otherwise.
Yes I know it's not related to HyperHTMLElement directly, it was intended as a question rather than a bug report :) Btw for anyone else who has the same problem, the issue can be solved by adding some browser target to the Babel config, eg.:
"browserslist": [
"last 1 chrome versions"
]
(related issue in Parcel project: https://github.com/parcel-bundler/parcel/issues/839)
Thanks guys!
the issue can be solved by adding some browser target to the Babel config ...
watch out, you haven't fixed the issue, you have avoided the transpilation of classes. I think that is safe these days https://caniuse.com/#feat=es6-class but if you target IE11 or older browsers, you better follow my instructions ;-)
Hi everyone,
First of all, I would like to thank you for creating hyperHTML, it's amazing! I want to play with it, especially with the HyperHTMLElement, but I have an error:
Uncaught TypeError: Class constructor HyperHTMLElement cannot be invoked without 'new'
I use Parcel with Babel 7.
Can you please help me on resolving this? I uploaded the project here: https://github.com/dios-david/hyperhtml-test
Thanks in advance, David