Skip to content

minthuzaw/vite-vue3

Repository files navigation

Vue 3 + Vite + Tailwind

minthuzaw - vite-vue3

Features

  • Vue3
  • Vue Composition API
  • Vue Router - The official router for Vue.js
  • Pinia - The Vue Store that you will enjoy using
  • Axios - Promise based HTTP client for the browser and node.js
  • I18ns - Vue I18n is internationalization plugin for Vue.js
  • Husky - Modern native git hooks made easy
  • Icon - Google font icon

Recommended IDE Setup

VSCode + ESLint + Prettier + Volar + Editor Config

Recommended Node Version

Node >= 16 <br>

Project setup

Edit .env

VITE_BASE_URL=
VITE_I18N_FALLBACK_LOCALE=en
VITE_I18N_LOCALE=en
npm install

Compiles and hot-reloads for development

npm run dev

Compiles and minifies for production

npm run build & npm run preview

Lints and fixes files

npm run lint

Formats files

npm run format

Example Api Fetch

import { useStore } from '@/store'
const store = useStore()
const isLoading = ref(false)

onMounted(async () => {
  await fetchPhoto()
})

const fetchPhoto = async () => {
  isLoading.value = true
  try {
    await store.fetchPhoto()
    const response = store.photo
    console.log(response)
    isLoading.value = false
  } catch (error) {
    console.error(error)
    isLoading.value = false
  }
}

About

A Simple vite + vue3 + tailwind setup

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors