Gem Gem

A Sprockets transformer that converts .vue file into js object.

heads up!

version 0.1.0 has incompatible changes, attempting to make the syntax work more similarly to Webpack/vue-loader.


  • You should assign module.exports variable to make it work! (not vm)
  • You should use VComponents instead of VCompents
  • Now supports normal javascript (as well as coffeescript)


following tag is supported in .vue file

  • script (coffeescript and js)
  • template (currently html only)
  • style (scss, sass and css)


add gem 'sprockets-vue' to Gemfile, and run bundle, currently works with sprockets 3.


  • index.vue ```vue //= require components/card

* application.coffee

#= require index

new Vue(
  el: '#search',
  components: {
    'index': VComponents.index
  • application.scss scss //=require index

you can include .vue file in css file, it's style block will be automatic processed. you can also use require_tree to include all .vue file.😘 scoped will not be supported.