Example usage of webpack-context-vuex-hmr
This project is based upon the Vue-cli webpack template, that has been modified to show how to get automatic HMR
running with Vuex
when organizing by using Vuex modules.
This is done by using the webpack-context-hmr webpack plugin.
For the Webpack 1 example, check the webpack1 branch
- Clone this repo
- Install dependencies by running
yarn
ornpm install
- Start the dev server
- Open devtools window with javascript console
- Modify any of the source files to trigger the
HMR
The interesting files are:- ./src/components/example-component/example-store.js
- ./src/components/example-component/helper-substore.js
- Try for example to change the mutation in the
helper-substore.js
- Changes to
initialState
requires manual browser refresh - Have fun!
MIT