Skip to content

This is a Boilerplate for Vite + Vue3 (TypeScript) + Vue-Router for alt:V

Notifications You must be signed in to change notification settings

Phill030/Vue-Boilerplate

Repository files navigation

alt:V Vue-Boilerplate

This boilerplate was made to simplify working with Vue and alt:V

Packages:

- Vite

- Vue3

- Vue-Router

- TypeScript

- altv/types-webviews

Does alt work?

✔ Yes

How to change the page?

To change the page you can either use

this.$router.push('/yourPath');

or use a router-link with a custom element

<router-link to="/yourPath" custom v-slot="{ navigate }">
  <button @click="navigate">Something</button>
</router-link>

How to add a page to the router?

You can add a new page by creating a new file for eg. in views/. Then open main.ts and add a new object in routes. Example:

import yourComponent from './views/yourComponent';
const routes = [
  {
    path: '/yourPath',
    name: 'YourName',
    component: yourComponent
  },
]

About

This is a Boilerplate for Vite + Vue3 (TypeScript) + Vue-Router for alt:V

Resources

Stars

Watchers

Forks