This template should help get you started developing with Vue 3 in Vite.
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.
- Clone project with
git clone git@github.com:elyte5star/Vue-JS3.git
git clone git@github.com:elyte5star/mark.js.git
-
place the mark.js folder under src/assets
-
Create file .env and set values for the environment variables below:
NODE_ENV=development
VITE_API_URL=http://localhost:8001/ # The base API endpoint to which requests are made
VUE_API_CLIENT_ID=elyte
VUE_BASE_URL=http://localhost:9000/
VUE_MAINTENANCE_MODE=false
VUE_WAIT_TIME=3000
VITE_APP_MSAL_CLIENT_ID=xxxxxxxxxxx
VUE_APP_MSAL_LOGIN_AUTHORITY=https://login.microsoftonline.com/xxxxxxxxxxxxxxxx
VUE_GOOGLE_CLIENT_ID=xxxxxxxxxxxxx.apps.googleusercontent.com
NGINX_PROXY_PASS=http://api:8001/
NGINX_PORT=8001
npm install
npm run dev
npm run build
Run Headed Component Tests with Cypress Component Testing
npm run test:unit:dev # or `npm run test:unit` for headless testing
Run End-to-End Tests with Cypress
npm run test:e2e:dev
This runs the end-to-end tests against the Vite development server. It is much faster than the production build.
But it's still recommended to test the production build with test:e2e
before deploying (e.g. in CI environments):
npm run build
npm run test:e2e
Lint with ESLint
npm run lint