Home

Issue: 944

The following object does not support the "find" property or method

[issue link]

@pi0
import Vue from 'vue’
import Vuex from ‘vuex’

Vue.use(Vuex)

// Recursive find files in ~/store
const files = require.context(’~/store’, true, /^./.*.(js|ts)$/)
const filenames = files.keys()

// Store
let storeData = {}

// Check if store/index.js exists

//The following object does not support the “find” property or method (in IE)

const indexFilename = filenames.find((filename) => filename.includes(’./index.’))

if (indexFilename) {
storeData = getModule(indexFilename)
}

This question is available on Nuxt.js community (#c811)