1.0.2 • Published 3 years ago

vue-fort-model-loader v1.0.2

Weekly downloads
5
License
MIT
Repository
github
Last release
3 years ago

vue-fort-model-loader

A webpack loader for the VueFort models.

Supports hot-reloading during development.

setup

npm i vue-fort-model-loader

usage

Use named exports to export the model options.

export function state() {
  return {
    count: 0,
  };
}

export const getters = {
  countDouble() {
    return this.count * 2;
  },
};

export const methods = {
  inc() {
    this.count++;
  },
};

Use the loader to define and import the model.

import model from 'vue-fort-model-loader!./path/to/model';