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.
- 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.
Vite requires Node.js version 18+ or 20+.
Clone the repository and install dependencies:
git clone <repository-url>
cd vite-vue2-vuex-router-starter
npm install
# or
yarn install
Start the development server:
npm run dev
# or
yarn dev
Open your browser and visit http://localhost:5173 to view your application.
To build the application for production:
npm run build
# or
yarn build
The production-ready files will be generated in the dist
directory.
Vue Router automatically integrates routes from the views
directory using dynamic import based on file naming conventions (*.router.js
).
For Vite-specific configurations and optimizations, refer to the vite.config.js
file in the root directory.
Feel free to fork this repository, make changes, and submit a pull request. Contributions are welcome!