Skip to content

vite-vue2-starter is a template for quickly starting Vue.js 2 projects. Built on the Vite v5 build tool

Notifications You must be signed in to change notification settings

larry-xue/vite-vue2-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vite + Vue2.7 + Vuex + Vue Router Starter

This is a starter template for Vue.js 2.7 projects using Vite as the build tool, Vuex for state management, and Vue Router for routing. The Vue Router automatically integrates routes from the views directory based on the configuration.

Features

  • Vite: Fast and lightweight development server with modern build setup.
  • Vue.js 2.7: The progressive JavaScript framework for building user interfaces.
  • Vuex: State management pattern and library for Vue.js applications.
  • Vue Router: The official router for Vue.js with automatic integration of routes from views directory.

Getting Started

Prerequisites

Vite requires Node.js version 18+ or 20+.

Installation

Clone the repository and install dependencies:

git clone <repository-url>
cd vite-vue2-vuex-router-starter
npm install
# or
yarn install

Development

Start the development server:

npm run dev
# or
yarn dev

Open your browser and visit http://localhost:5173 to view your application.

Build for Production

To build the application for production:

npm run build
# or
yarn build

The production-ready files will be generated in the dist directory.

Automatic Router Integration

Vue Router automatically integrates routes from the views directory using dynamic import based on file naming conventions (*.router.js).

Custom Configuration

For Vite-specific configurations and optimizations, refer to the vite.config.js file in the root directory.

Contributing

Feel free to fork this repository, make changes, and submit a pull request. Contributions are welcome!


About

vite-vue2-starter is a template for quickly starting Vue.js 2 projects. Built on the Vite v5 build tool

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published