Currently, I am working on a Laravel + Vue 3 project and need to incorporate Vuex into the project. In my store.js
file, I have configured my Vuex as shown below:
import { createApp } from 'vue'
import { createStore } from 'vuex'
const store = createStore({
/* state, actions, mutations */
state : {
counter : 1000
}
});
const app = createApp();
app.use(store);
app.mount("#app");
In addition, my app.js
file looks like this:
import ViewUIPlus from 'view-ui-plus'
import 'view-ui-plus/dist/styles/viewuiplus.css'
import common from './common'
import store from './store' //importing store.js
createApp({
components: {
mainapp,
}
}).use(router).use(ViewUIPlus).mixin(common).mount('#app');
However, I am encountering difficulties in importing the store.js into the app.js file. Can you provide some guidance or solution for this issue?