You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The resulting code fails to be processed by Babel.
It's caused by the parenthesis wrapping the exported content.
As a workaround, I use the following code for Case 1, but for Case 2, I have to declare a variable to hold the exported content and export that variable.
``export default ``
Ember.Route.extend do
title: 'homepage'
I wonder why wrap other code within parenthesis? And can I get rid of it? Though it's pretty trivial.
Or, I should create a issue for Babel instead?
I'm sure this won't be a problem after LiveScript natively support ES6 module, but it seems no schedule was made yet. See #705.
The text was updated successfully, but these errors were encountered:
bianjp
changed the title
Prevent generate surrounding parenthesis for code in lines that has Javascript code literals
Prevent generating surrounding parenthesis for code in lines that has Javascript code literals
Jul 29, 2015
for case 2, an exception would need to be made to check to see if CALL( is named default and (if you want to get really fancy) check to see if the parent is export and is also the root scope. not that big of a deal
for case 1 you can just add a semicolon to keep it on one line
Case 1:
produces
Case 2:
produces
The resulting code fails to be processed by Babel.
It's caused by the parenthesis wrapping the exported content.
As a workaround, I use the following code for Case 1, but for Case 2, I have to declare a variable to hold the exported content and export that variable.
It produces
and works well with Babel.
I wonder why wrap other code within parenthesis? And can I get rid of it? Though it's pretty trivial.
Or, I should create a issue for Babel instead?
I'm sure this won't be a problem after LiveScript natively support ES6 module, but it seems no schedule was made yet. See #705.
The text was updated successfully, but these errors were encountered: