Is there be any way to use single file components in Ember?


#1

I know there’s a ember-component-css add-on, but I would rather have the HTML/CSS/JS all in one file. A setup similar to .vue single file components.


#2

No there isn’t. You will need a package.json and some .js file. Not sure if I would want it but I think you can let browserify create this file. css will have to be included as html style I think. You would have to run npm run build like this:


#3

Not yet, but coming “soon”

The module unification RFC actually covered this use case. It let you mix style, template, and js all in one file. Erik Bryn did a demo at a Meetup before, but not sure how ready that was. Maybe hit him up on slack?