Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify what environments are targeted by buble's codebase #93

Closed
Andarist opened this issue Jan 8, 2018 · 8 comments · Fixed by #103
Closed

Clarify what environments are targeted by buble's codebase #93

Andarist opened this issue Jan 8, 2018 · 8 comments · Fixed by #103
Labels

Comments

@Andarist
Copy link
Contributor

Andarist commented Jan 8, 2018

react-styleguidist uses buble in the browser, but unfortunately buble ships to npm codebase containing some es6 features.

I'd only want to clarify what environments buble is targeting - in which node/browser versions it should run out of the box? Would you consider transpiling more features to support older browsers like IE11 or should we fix this in a tool like react-styleguidist by transpiling buble on our own?

@adrianheine
Copy link
Member

@Rich-Harris what do you think? Since IE11 doesn't support classes, #66 and #40 are relevant here, too. I would say bublé should only be compiled for node 4.

@Andarist
Copy link
Contributor Author

Maybe you could transpile with node4 support in mind for main entry and for the browser it could be transpiled down to es5? Although Im not sure what to do about module entry - at the moment its mainly targeting browsers too (as its understood by bundlers), but maybe some people somehow bundle for node too? 🤔 Would be actually good to have browser:module/module:browser 😂

@Andarist
Copy link
Contributor Author

@adrianheine WDYT about the proposed solution of transpiling with different targets in mind for main and browser fields?

@adrianheine
Copy link
Member

I think that makes sense. We would have to find a workaround for #40, though.

@Andarist
Copy link
Contributor Author

Imho that's a separate issue, that could ofc be fixed/tackled somehow but it is not tightly coupled to this one - or am I missing something?

@adrianheine
Copy link
Member

adrianheine commented Jan 26, 2018

It is coupled, because transpiling classes will make our errors not have a message or a stack, so we would basically break the browser build.

@Andarist
Copy link
Contributor Author

Hm, I can't be sure about all old browser, but you assign custom stack property here and it is readable in latest Chrome (when using transpiled version of CompileError class). Ain't sure about description because I don't know origin of this property - you do not specify it in CompileError's constructor nor it is built-in property of native Error. Maybe you had some other prop in mind?

most.js has migrated to transpiled version of buble's output (because they have migrated to babel which didnt support extending built-ins) for their custom DisposeAllError and it seems to work OK.

@adrianheine
Copy link
Member

Sorry, I meant message. It seems like you're right and CompileError already does what's necessary, so we should be able to do this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants