maoberlehner/vuex-map-fields

How to use this if my stores are modularised, webpackified and not exporting default?

geoidesic opened this issue · 1 comments

So my store looks like this

enquiry
-- actions.js
-- getters.js
-- index.js
-- mutations.js
-- state.js

In getters.js I have this:

export const getTests = state => {
  return state.tests;
};

export const getEmpty = state => {
  return state.emptystate;
};

and in the index.js

import stateImport from "./state";
import * as getterImport from "./getters";
import * as mutationImport from "./mutations";
import * as actionImport from "./actions";

export const namespaced = true;
export const state = stateImport;
export const getters = getterImport;
export const mutations = mutationImport;
export const actions = actionImport;

So I can't figure out how to implement getField and updateField in this context?

Actually this works as per the example in the docs: https://codesandbox.io/s/m51j02794p

I had some trouble porting it into my app but after building my own basic example in codesandbox, then porting that into a freshly created project on my Vue framework, I was able to port it in.