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

ExecJS doesn't allow printing error messages from Babel #284

Closed
ralekna opened this issue Nov 13, 2015 · 1 comment
Closed

ExecJS doesn't allow printing error messages from Babel #284

ralekna opened this issue Nov 13, 2015 · 1 comment

Comments

@ralekna
Copy link

ralekna commented Nov 13, 2015

I have a huge legacy JavaScript file and I decided to start converting it into ES6 module.

When I compile it using babel-cli I get such warning:
Note: The code generator has deoptimised the styling of "myscript.js" as it exceeds the max of "100KB".

But when I try to compile it by using this gem, internally used ExecJS can't display that message because it doesn't have such thing as console and is not planing to have one (sstephenson/execjs#91 and https://github.com/sstephenson/execjs/blob/master/test/test_execjs.rb#L237).

Current solution while still using ExecJS would be to define dummy console object with its dummy functions like log and error but then all such errors like this will be eaten by void.

ralekna pushed a commit to ralekna/ruby-babel-transpiler that referenced this issue Nov 18, 2015
ralekna pushed a commit to ralekna/ruby-babel-transpiler that referenced this issue Nov 18, 2015
ralekna pushed a commit to ralekna/ruby-babel-transpiler that referenced this issue Nov 18, 2015
ralekna added a commit to ralekna/ruby-babel-transpiler that referenced this issue Nov 19, 2015
fixes babel#284 added console utility that mimics browser equivalent
@tricknotes
Copy link
Member

This is the expected ExecJS's behavior.

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

No branches or pull requests

2 participants