The boilerplate of Vue v3, Typescript, Vite, Vue Router, Pinia, Axios, Tailwind CSS, and Vue i18n for buildings efficient, faster, maintainable, and scalable for enterprise applications.
VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).
TypeScript cannot handle type information for .vue
imports by default, so we replace the tsc
CLI with vue-tsc
for type checking. In editors, we need TypeScript Vue Plugin (Volar) to make the TypeScript language service aware of .vue
types.
If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a Take Over Mode that is more performant. You can enable it by the following steps:
- Disable the built-in TypeScript Extension
- Run
Extensions: Show Built-in Extensions
from VSCode's command palette - Find
TypeScript and JavaScript Language Features
, right click and selectDisable (Workspace)
- Run
- Reload the VSCode window by running
Developer: Reload Window
from the command palette.
See Vite Configuration Reference.
-
Node Js version
v20.10.0
. The current Long Term Support (LTS) release is an ideal starting point. -
Visual Studio Code. Visual Studio Code is the free and open-sourced code editor. It is one of the top most editor used especially for JavaScript application development.
Recommended Plugin for VSCode
-
Make sure you have a fresh version of Node.js and NPM installed.
-
Clone this repository to your computer:
https://github.com/saymenghour/vue3-enterprise-boilerplate.git
-
Go to project directory:
cd vue3-enterprise-boilerplate
-
Open project in VScode:
code .
-
Run command below to ignore git case-sensitive filename
git config --global core.ignorecase false
-
From the project's root directory, install the required packages (dependencies):
using npm:
npm install
or using pnpm:
pnpm install
-
Create environment files:
cp .env.example .env
or for local development using
cp .env .env.local
-
Change its values appropriately
BASE_API_URL="http://localhost:8080"
-
To run the app on your local machine:
npm run dev
-
Build for production
npm run build
Happy Coding... :)