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

ES6/Babel support #14

Closed
TrySpace opened this issue Apr 25, 2016 · 5 comments
Closed

ES6/Babel support #14

TrySpace opened this issue Apr 25, 2016 · 5 comments

Comments

@TrySpace
Copy link

TrySpace commented Apr 25, 2016

Any plans on supporting es6/babel syntax, or conversion from ES6 to ES5?

@KyleAMathews
Copy link
Owner

Hi you want https://github.com/babel/babel-loader for this.

@TrySpace
Copy link
Author

What I mean is if there is any plans to add babel-loader to this repo.

I'm struggling to add it myself, because simply adding "babel?presets[]=es2015" to the 'cjsx' loaders gives me the error that import is a reserved word, or it doesn't recognize #

@KyleAMathews
Copy link
Owner

You don't understand Webpack loaders correctly. Each Webpack loader (like this one) is meant to be used only with one type of file. cjsx-loader is designed to load/transform CJSX (JSX in Coffeescript) and that's it. Combining Babel and CJSX would be weird... try imagining a file with Coffeescript and Javascript intermingled.

Try googling for some tutorials on setting up Webpack loaders. They can be pretty confusing at first for sure.

@TrySpace
Copy link
Author

Ok, so I found out the maintainer is coffeescript is very unwilling to adapt any es6 syntax.
On the other hand, I found out there is similar Class definitions and a lot of other similarities, so I don't have to completely rewrite es6 code examples that much.
Mainly the import is the most annoying, but there is https://www.npmjs.com/package/coffee-import, however, I can't get that to work with cjsx yet, not sure if it's the load order, or it would have to be combined probably.

@TrySpace
Copy link
Author

TrySpace commented Apr 28, 2016

Also, there was even a kickstarter for a potential coffeescript 2, called coffee-redux, but it has been inactive for almost a year now, and it seems that it's also dead: michaelficarra/CoffeeScriptRedux#338

It's likely because of this coffeescript is dying, and hopefully will be replaced by a new language.

Perhaps Earl Grey
Or something like PureScript
Maybe BabelScript, I like the name, but it's a shell of an RFC proposal, so basically nothing at all...
Or TacoScript
But offcourse for the real pros there's always: DogeScript which is taking the world by storm.

Although they would all require rewriting existing code.

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