create by 2.6.9
vue init webpack chen_vue
npm install -S vue-style-loader
npm install -S vue
npm install -S vuex@3.6.2
"js-cookie": "^3.0.5",
"less": "^3.13.1",
"less-loader": "^5.0.0",
"vue": "^2.7.16",
"vue-router": "^3.0.1",
"vuex": "^3.6.2"
安装包坑
vuex 在vue 2.x时,使用版本^3.6.2 使用4.x时,全局引用不生效
A Vue.js project
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
# build for production and view the bundle analyzer report
npm run build --reportFor a detailed explanation on how things work, check out the guide and docs for vue-loader.