Comments (5)
Hi you want https://github.com/babel/babel-loader for this.
from cjsx-loader.
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 #
from cjsx-loader.
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.
from cjsx-loader.
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.
from cjsx-loader.
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.
from cjsx-loader.
Related Issues (11)
- cjsx-loader does not parse when being used as loader in Karma and webpack setup HOT 1
- coffee-react-transform discontinued :(
- cjsx-loader uses a vulnerable version of loader-utils
- Add sourcemaps support HOT 6
- Document how to use loader in Webpack HOT 2
- Ternary ops HOT 7
- coffee-react-transform 2.4.1 is broken HOT 4
- Question about CJSX and Coffee HOT 1
- CommonChunks - dependency resolution breaks when you use this loader HOT 1
- Can't interpolate object attribute names HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cjsx-loader.