0👍
✅
There is an option in called proxyTable in the file config/index.js
.
We were able to set the webpack root to proxy through the local Rails server by setting this option as proxyTable: {"/": "http://localhost:3000"}
3000 is the default port for a Rails dev server, but you may need to change this if you are running on a different port.
-1👍
Get rid of webpacker, if you at all can. Vue can be used from cdn quite fine.
When the vue app is instantiated in the rails template, data can be passed really easily with #{@model.to_json}
.
Vue components can be written using x-template syntax, either in rails templates or asset pipeline.
Source:stackexchange.com