Import lists dynamically

This commit is contained in:
Sam Carlton 2020-11-27 16:37:08 -06:00
parent f3d275935e
commit 02e90c2f96

View file

@ -40,14 +40,14 @@ import LinkButton from '~/components/link-button.vue'
import { byTimeThenNull } from '~/helpers/sort-list.js'
import appList from '~/static/app-list.json'
import gamelist from '~/static/game-list.json'
// import appList from '~/static/app-list.json'
// import gamelist from '~/static/game-list.json'
export default {
async asyncData () {
// const { default: appList } = await import('~/static/app-list.json')
// const { default: gamelist } = await import('~/static/game-list.json')
const { default: appList } = await import('~/static/app-list.json')
const { default: gamelist } = await import('~/static/game-list.json')
const allList = [
...appList.sort(byTimeThenNull),