Hướng dẫn setup vuex router in vuejs 3 version
1.Setup vuejs 3 cli
npm install -g @vue/cli
2.Tạo project tên: vuex_route
vue create vuex_route
cmd sẽ hiện thị như sau:
Chọn Manually select features
Di chuyển xuống và dùng spacebar select Router, Vuex and Linter / Formatter
Tiếp theo chọn version của vuejs la 3.x
Tiếp theo Use history mode for router? chọn Y
Tiếp theo Pick a linter / formatter config chọn ESLint + Prettier
Tiếp theo Pick additional lint features chọn Lint on save
Tiếp theo Where do you prefer placing config for Babel, ESLint, etc.? chọn In dedicated config files
Tiếp theo save all of these settings as a preset. chon N
Tới đây đã là bước cuối cùng
Run project:npm run serve
Tiếp theo tạo file vue.config.js ở root folder thêm cấu hình như sau:
module.exports = { chainWebpack: config => { config.module.rules.delete('eslint'); } }