https://github.com/rails/webpacker#vue
To use Webpacker with Vue, create a new Rails 5.1+ app using --webpack=vue option:
# Rails 5.1+
rails new myapp --webpack=vue
(or run bundle exec rails webpacker:install:vue on a Rails app already setup with Webpacker).
The installer will add Vue and its required libraries using Yarn alongside automatically applying changes needed to the configuration files. An example component will be added to your project in app/javascript so that you can experiment with Vue right away.
If you're using Rails 5.2+ you'll need to enable unsafe-eval rule for your development environment. This can be done in the config/initializers/content_security_policy.rb with the following configuration:
if Rails.env.development?
policy.script_src :self, :https, :unsafe_eval
else
policy.script_src :self, :https
end
You can read more about this in the Vue docs.