WebReflection / hyperHTML

A Fast & Light Virtual DOM Alternative
ISC License
3.06k stars 112 forks source link

Build a debuggable esm.js #342

Closed salomvary closed 5 years ago

salomvary commented 5 years ago

Use case: using browser-native import and still being able to debug

coveralls commented 5 years ago

Pull Request Test Coverage Report for Build 834


Totals Coverage Status
Change from base Build 831: 0.0%
Covered Lines: 333
Relevant Lines: 333

💛 - Coveralls
WebReflection commented 5 years ago

if it's for debugging, why don't you use:

import hyperHTML from '//unpkg.com/hyperhtml?module';

??? in that case you don't even deal with the already transpiled module, which is useless for debugging, IMO, you deal with the real thing.

salomvary commented 5 years ago

import hyperHTML from '//unpkg.com/hyperhtml?module';

Yup, that's also an option.

Long story: I have a minimalist setup where my dev server is a static web server, my dependency manager is npm and my imports look like import from './node_modules/....

Anyway, I understand you might not want to publish yet another format and I can certainly live without this:)

And thanks for hyperHTML btw!

WebReflection commented 5 years ago

Apologies but I don't see value in this, when you can just import es.js. A debugging session with a file that doesn't even represent the source would be useless even for bug reports. Errors also shouldn't really come from this lib, there is code coverage to grant that. However, whenever an error happens due this lib, then you can always use the unpkg version to find out where exactly it fails in the source, so that having also non minified ESM looks redundant.

I hope I've reasoned well why I am closing this. Happy to answer questions, if needed 👋