-
Notifications
You must be signed in to change notification settings - Fork 58
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
Can I use this with ES6 modules? #69
Comments
coffee-react-transform won't be any different to normal coffeescript. I'm not sure how the Meteor modules support works, but basically you need to figure out what ES5 javascript code Meteor converts the ES6 import statement into and just write that in coffeescript. Eg. if it's like babel, it will basically convert an import statement into a |
I am in a similar situation and was wondering if there is a feasible way out... I am backticking my ES6 `import BaseComponent from 'base_component.js'`
class Header extends BaseComponent
@propTypes:
username : React.PropTypes.string
...
constructor: (props) ->
super
...
`export default Header` Hate to make it seem like I am asking you to do my work for me, I just feel that you are the most qualified person to answer such questions! Thanks! |
coffee-react-transform will leave these statements untouched. coffee-script will also just pass them straight through. What will process the es6 import syntax? No browser supports it natively yet. Have you configured SystemJS to know that it needs to apply ES6 transpilation (eg. babel or traceur) to the output of the coffee-script compiler? SystemJS itself doesn't understand ES6 import/export syntax directly, it first runs a transpiler and then whatever that outputs in place of import/export is what it understands at runtime. |
I really want to use coffeescript again but I am using the modules beta dev of Meteor.
This means I can import pacakges and such.
But I am not sure if it will work with coffeescript.
Any idea?
The text was updated successfully, but these errors were encountered: