Skip to content

Commit

Permalink
cnore: remove store
Browse files Browse the repository at this point in the history
  • Loading branch information
tassioFront committed Aug 26, 2021
1 parent 112d440 commit 819632b
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 70 deletions.
1 change: 0 additions & 1 deletion .env.production
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ REMOTE_ROOT=root@https://mfe-module-federation-vue-root.netlify.app/remoteEntry.
REMOTE_CART=cart@https://mfe-module-federation-vue-cart.netlify.app/remoteEntry.js
REMOTE_PRODUCTS=products@https://mfe-module-federation-vue-products.netlify.app/remoteEntry.js
REMOTE_PROFILE=profile@https://mfe-module-federation-vue-profile.netlify.app/remoteEntry.js
REMOTE_STORE=store@https://mfe-module-federation-vue-store.netlify.app/remoteEntry.js
REMOTE_AUTH=auth@https://mfe-module-federation-vue-auth.netlify.app/remoteEntry.js
REMOTE_DS=ds@https://mfe-module-federation-vue-ds.netlify.app/remoteEntry.js
5 changes: 0 additions & 5 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ export default {
{ title: "About", icon: "mdi-help-box" },
],
}),
mounted() {
// console.log("root", this.$store);
this.$store.dispatch("user/setUser", { usuario: "teste" });
console.log("mounted - App.vue - root");
},
methods: {
changeMenuState() {
this.drawer = !this.drawer;
Expand Down
4 changes: 1 addition & 3 deletions src/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@ import App from "./App.vue";
import VueRouter from "vue-router";
import router from "./router";
import store from "./store";
import userConfig from "./helper-modules/user.module";
import UserTools from "auth/UserTools";
import { frameworkConfig } from "ds/DSConfig";

Vue.config.productionTip = false;
Vue.use(VueRouter);

const initApp = async () => {
await userConfig.getUser(); // Requesting once
await UserTools.service.firstLoadUserData(); // Requesting once (from store)
await UserTools.service.firstLoadUserData(); // Requesting once

new Vue({
router,
Expand Down
35 changes: 0 additions & 35 deletions src/helper-modules/user.module.js

This file was deleted.

3 changes: 1 addition & 2 deletions src/store.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import Vue from "vue";

import Vuex from "vuex";
import userModuleFromRoot from './userModuleFromRoot'
Vue.use(Vuex);

const cartModule = {
Expand Down Expand Up @@ -33,7 +32,7 @@ const cartModule = {
const store = new Vuex.Store({
modules: {
cart: cartModule,
user: userModuleFromRoot,
user: {},
},
});

Expand Down
22 changes: 0 additions & 22 deletions src/userModuleFromRoot.js

This file was deleted.

2 changes: 0 additions & 2 deletions vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,13 @@ module.exports = {
exposes: {
"./userModuleFromRoot": "./src/userModuleFromRoot",
"./userModuleFromRootByHelper": "./src/helper-modules/user.module",
"./store": "./src/store",
},
remotes: {
cart: process.env.REMOTE_CART,
products: process.env.REMOTE_PRODUCTS,
profile: process.env.REMOTE_PROFILE,
root: process.env.REMOTE_ROOT,
auth: process.env.REMOTE_AUTH,
store: process.env.REMOTE_STORE,
ds: process.env.REMOTE_DS,
},
shared: dependencies,
Expand Down

0 comments on commit 819632b

Please sign in to comment.