No description
Find a file
2023-08-10 10:33:44 -06:00
.vim Add basic vue app 2023-08-09 19:31:10 -06:00
api Update vite to have proper routing for api 2023-08-10 10:26:16 -06:00
app Move axios to main.ts 2023-08-10 09:14:25 -06:00
e2e Add basic vue app 2023-08-09 19:31:10 -06:00
public Add basic vue app 2023-08-09 19:31:10 -06:00
.env Update vite to have proper routing for api 2023-08-10 10:26:16 -06:00
.eslintrc.json Initial commit from Create Next App 2023-05-26 09:10:42 -06:00
.gitignore Update to latest code from vercel examples 2023-08-09 10:09:29 -06:00
.pre-commit-config.yaml Add precommit and basic sqlalchemy setup 2023-08-09 11:00:55 -06:00
env.d.ts Add basic vue app 2023-08-09 19:31:10 -06:00
index.html Add basic vue app 2023-08-09 19:31:10 -06:00
LICENSE Add MIT license 2023-06-06 08:51:46 -06:00
package.json Add basic vue app 2023-08-09 19:31:10 -06:00
playwright.config.ts Update vite to have proper routing for api 2023-08-10 10:26:16 -06:00
pnpm-lock.yaml Add basic vue app 2023-08-09 19:31:10 -06:00
poetry.lock Add basic vue app 2023-08-09 19:31:10 -06:00
postcss.config.js Initial commit from Create Next App 2023-05-26 09:10:42 -06:00
pyproject.toml Remove next references 2023-08-10 10:33:44 -06:00
README.md Add basic vue app 2023-08-09 19:31:10 -06:00
tailwind.config.js Initial commit from Create Next App 2023-05-26 09:10:42 -06:00
tsconfig.app.json Add basic vue app 2023-08-09 19:31:10 -06:00
tsconfig.json Update vite to have proper routing for api 2023-08-10 10:26:16 -06:00
tsconfig.node.json Add basic vue app 2023-08-09 19:31:10 -06:00
tsconfig.vitest.json Add basic vue app 2023-08-09 19:31:10 -06:00
vite.config.ts Update vite to have proper routing for api 2023-08-10 10:26:16 -06:00
vitest.config.ts Add basic vue app 2023-08-09 19:31:10 -06:00

vue-fastapi

This template should help get you started developing with Vue 3 in Vite.

VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).

Type Support for .vue Imports in TS

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:

  1. Disable the built-in TypeScript Extension
    1. Run Extensions: Show Built-in Extensions from VSCode's command palette
    2. Find TypeScript and JavaScript Language Features, right click and select Disable (Workspace)
  2. Reload the VSCode window by running Developer: Reload Window from the command palette.

Customize configuration

See Vite Configuration Reference.

Project Setup

npm install

Compile and Hot-Reload for Development

npm run dev

Type-Check, Compile and Minify for Production

npm run build

Run Unit Tests with Vitest

npm run test:unit

Run End-to-End Tests with Playwright

# Install browsers for the first run
npx playwright install

# When testing on CI, must build the project first
npm run build

# Runs the end-to-end tests
npm run test:e2e
# Runs the tests only on Chromium
npm run test:e2e -- --project=chromium
# Runs the tests of a specific file
npm run test:e2e -- tests/example.spec.ts
# Runs the tests in debug mode
npm run test:e2e -- --debug

Lint with ESLint

npm run lint