Vite Project Template Vue Ts screenshot

Vite Project Template Vue Ts

Author Avatar Theme by Anhchangvt1994
Updated: 25 Jul 2024
14 Stars

Advanced Structure for vite with template vue 3.x and ts. It contains advanced env support, integrate tailwindcss, easy and clearly to split chunks. And some project's formatter like eslint, editorconfig, prettier, lint-stage, husky, commitizen

Categories

Overview

The advanced structure and configuration for a Vite + Vue 3.x + TypeScript project presents a modern development experience that simplifies management and increases productivity. By utilizing JavaScript files for defining environment variables, developers are ushered into a more flexible and intuitive process compared to traditional .env files. This project aims to streamline how developers organize and use their resources, making it particularly useful for those familiar with JavaScript.

This setup not only enhances the structure of a typical Vite project but also provides built-in utility features such as automatic suggestions for available environment variables. The organization of files and directories promotes efficient coding practices while providing a comprehensive framework that can accommodate complex applications.

Features

  • Environment Directory: Contains environment variable files as .mjs files for better management and flexibility compared to .env files.
  • Improved Variable Definitions: Allows developers to define environment variables of any type, not just strings, enhancing the overall configurability.
  • Automatic Suggestions: The ImportMeta.d.ts generates automatically, providing code editors with the ability to suggest available environment variables, significantly speeding up the development process.
  • Organized File Structure: Features a clear organization with directories for components, pages, configuration files, and assets, which helps maintain a clean project structure.
  • Centralized Asset Management: The src directory effectively handles all assets and logic, enabling easy access and management of styles, images, and other resources.
  • Custom Utility Functions: Facilitates the inclusion of customized utilities such as the Composition API and libraries, allowing for better reusability and modular code.
  • Simple Registration Process: The streamlined registration of new environment variables through env-register.mjs makes it quick and easy to manage API endpoints and other configurations.