function getModule(filename) {
    const file = files(filename);
    const module = file.default || file;

    if (module.commit) {
        throw new Error(
            '[lavas] store/' + filename.replace('./', '') + ' should export a method which returns a Vuex instance.'
        );
    }

    if (module.state && typeof module.state !== 'function') {
        throw new Error(
            '[lavas] state should be a function in store/' + filename.replace('./', '')
        );
    }

    return module;
}
get module by file name
this module or state must be a function which returns a Vuex instance of fresh state instance

@param {string} filename filename
@return {*}