[Vuejs]-Vuex Mutation does not work with Nuxt.js

0👍

Leaving this for future search. The rss-parser wasn’t returning when it was fired because it lacked CORS.

import rssParser from 'rss-parser'
const CORS_PROXY = "https://cors-anywhere.herokuapp.com/"

export default function ({ store, route }) {
    let parser = new rssParser()

    parser.parseURL(CORS_PROXY + 'https://medium.com/feed/@user_name', (err, feed) => {
        console.log(feed)
        store.commit('ADD_MEDIUM', feed)
    })
}

Leave a comment