YUNOVA · Vue.js
Module 13: Production Vue apps
Authentication in Vue with JWT
Key points
- After login the server returns a JWT that proves who the user is.
- Send the token in the Authorization header on API calls.
- Route guards redirect users who are not logged in.
Progressive Web App with Vue
Key points
- A PWA can be installed and can work offline.
- vite-plugin-pwa adds a service worker and web manifest.
- Cache key files so the app loads without a network.
Internationalisation with vue-i18n
Key points
- vue-i18n stores translations as messages per language.
- Use $t('key') or useI18n() to show translated text.
- Switch the locale at runtime to change language.
Deploying a Vue app with Docker and CI
Key points
- npm run build creates static files in the dist folder.
- A Docker image can serve dist with a web server like nginx.
- CI runs tests and builds on every push before deploying.