File tree Expand file tree Collapse file tree 4 files changed +25
-4
lines changed Expand file tree Collapse file tree 4 files changed +25
-4
lines changed Original file line number Diff line number Diff line change 1010 },
1111 "dependencies" : {
1212 "vue" : " ^3.2.6" ,
13- "vue-router" : " ^4.0.11"
13+ "vue-router" : " ^4.0.11" ,
14+ "vuex" : " ^4.0.2"
1415 },
1516 "devDependencies" : {
17+ "@types/node" : " ^16.7.1" ,
1618 "@typescript-eslint/eslint-plugin" : " ^4.30.0" ,
1719 "@typescript-eslint/parser" : " ^4.30.0" ,
18- "@types/node" : " ^16.7.1" ,
1920 "@vitejs/plugin-vue" : " ^1.6.0" ,
2021 "@vue/compiler-sfc" : " ^3.0.5" ,
2122 "@vue/eslint-config-prettier" : " ^6.0.0" ,
Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ import { createApp } from "vue";
22import App from "@/App.vue" ;
33import router from "@/router" ;
44
5+ import { store } from "./store" ;
6+
57import "./assets/scss/style.scss" ;
68
7- const app = createApp ( App ) . use ( router ) . mount ( "#app" ) ;
9+ const app = createApp ( App ) . use ( store ) . use ( router ) . mount ( "#app" ) ;
Original file line number Diff line number Diff line change 1+ import { createStore , createLogger } from "vuex" ;
2+
3+ // Plug in logger when in development environment
4+ const debug = process . env . NODE_ENV !== "production" ;
5+ const plugins = debug ? [ createLogger ( { } ) ] : [ ] ;
6+
7+ export const store = createStore ( {
8+ plugins,
9+ modules : { } ,
10+ strict : debug ,
11+ } ) ;
Original file line number Diff line number Diff line change 353353 " @vue/compiler-dom" " 3.2.21"
354354 " @vue/shared" " 3.2.21"
355355
356- " @vue/devtools-api@^6.0.0-beta.18 " :
356+ " @vue/devtools-api@^6.0.0-beta.11 " , "@vue/devtools-api@^6.0.0-beta. 18":
357357 version "6.0.0-beta.19"
358358 resolved "https://registry.yarnpkg.com/@vue/devtools-api/-/devtools-api-6.0.0-beta.19.tgz#f8e88059daa424515992426a0c7ea5cde07e99bf"
359359 integrity sha512-ObzQhgkoVeoyKv+e8+tB/jQBL2smtk/NmC9OmFK8UqdDpoOdv/Kf9pyDWL+IFyM7qLD2C75rszJujvGSPSpGlw==
@@ -2263,6 +2263,13 @@ vue@^3.2.6:
22632263 " @vue/server-renderer" " 3.2.21"
22642264 " @vue/shared" " 3.2.21"
22652265
2266+ vuex@^4.0.2 :
2267+ version "4.0.2"
2268+ resolved "https://registry.yarnpkg.com/vuex/-/vuex-4.0.2.tgz#f896dbd5bf2a0e963f00c67e9b610de749ccacc9"
2269+ integrity sha512-M6r8uxELjZIK8kTKDGgZTYX/ahzblnzC4isU1tpmEuOIIKmV+TRdc+H4s8ds2NuZ7wpUTdGRzJRtoj+lI+pc0Q==
2270+ dependencies :
2271+ " @vue/devtools-api" " ^6.0.0-beta.11"
2272+
22662273which@^2.0.1 :
22672274 version "2.0.2"
22682275 resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1"
You can’t perform that action at this time.
0 commit comments