Answer the question
In order to leave comments, you need to log in
Why is there an index.js and main.js file in the vue project, why not just one, what is each of them for?
this is in the index
import Vue from 'vue';
import Vuex from 'vuex';
import createPersistedState from 'vuex-persistedstate';
// import * as Cookies from 'js-cookie';
import dataList from './modules/dataList/dataList';
Vue.use(Vuex);
export default new Vuex.Store({
modules: {
dataList,
},
strict: true,
plugins: [
createPersistedState(),
],
});
import Vue from 'vue';
import axios from 'axios';
import App from './App.vue';
import store from './store';
Vue.prototype.$http = axios;
Vue.config.productionTip = false;
new Vue({
store,
axios,
render: h => h(App),
}).$mount('#app');
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question