Super fast dev workflow with self contained vue components + hot module replacement.
bundle install
npm install
./bin/webpack-dev-server
Not required reading but useful for context. This project combines code from:
with a bit of tinkering to get them to play nice together.
From here:
rails webpacker:install
rails webpacker:install:vue
This created a separate non-rails project containing some of the config files we need.
From here:
npm install -g vue-cli
vue init webpack-simple hello
cd hello
npm install
- Copied the
rules
section fromwebpack.config.js:12
toshared.js
in rails app. - Added the --hot flag to
/bin/webpack-dev-server:31
. - Added
publicPath: 'http://localhost:8080/'
toshared.js:26
to fix a compilation bug.