Structure of Vuex Store

VueWpJson plugin creates few VueX store modules to store a fetched data.


There we inject whole config object under "config" key
Example value:

config: {
  lang: 'en',
  url: '',
  menus: ["info", "contact"]

Config object implement this interface:

export interface EditablePluginConfig {
  url: string,
  lang: string,
  requestPrefix?: string,
  titleTemplate?: string,
  debugger?: Boolean

Creating this module was essential to make it compatibile with Nuxt.

There we have our menus if we did not disable them and on our Wordpress we have installed this plugin


Here we store default website's meta data. If page does not have any it will be used as fallback.


There we store our fetched posts' content. Under post key we have pairs like:

"types": {
  "posts": {
    "my-post": {/*...*/},
  "pages": {
    "my-page": {/*...*/},
  "custom-post-type": {
    "my-custom-post": {/*...*/},

Saved data is freezed by Object.freeze for optimization purpose.