// Generated by Vue on Rails https://github.com/vueonrails/vueonrails // Display this Vue component on Rails View by adding `require('./<%= name %>')` to app/javascript/application.js // Generate a component part by running command `rails generate vue something` import Vue from 'vue' <% if options['seperate'] -%> import App from '@/<%= name %>/<%= name %>.vue' <% else -%> import App from '@/<%= name %>.vue' <% end -%> document.addEventListener('DOMContentLoaded', () => { document.body.appendChild(document.createElement('<%= name %>')) const <%= name %> = new Vue({ render: h => h(App) }).$mount('<%= name %>') console.log({<%= name %>}) })