feat(auth): scaffold auth pages and guards
- Add Pinia auth store, types, and auth service (mocked) - Add login/register/verify/forgot password views and dashboard - Add reusable auth UI components (card, inputs, buttons) - Add router guards and protected routing wiring - Disable vue devtools plugin by default to avoid Node localStorage crash - Update dependencies for cookie handling - Comment out Umami script in index.html Made-with: Cursor
This commit is contained in:
+16
-6
@@ -2,14 +2,23 @@ import { fileURLToPath, URL } from 'node:url'
|
||||
|
||||
import { defineConfig } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import vueDevTools from 'vite-plugin-vue-devtools'
|
||||
|
||||
// https://vite.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
vue(),
|
||||
vueDevTools(),
|
||||
],
|
||||
export default defineConfig(async ({ command }) => {
|
||||
// `vite-plugin-vue-devtools` (via @vue/devtools-kit) can access `localStorage`
|
||||
// at import time, which crashes when Vite loads this config in Node.
|
||||
// Load it lazily and only for the dev server.
|
||||
const plugins = [vue()]
|
||||
|
||||
// Opt-in only: enable by running `VITE_VUE_DEVTOOLS=true npm run dev`
|
||||
// This avoids Node-side crashes when loading the Vite config.
|
||||
if (command === 'serve' && process.env.VITE_VUE_DEVTOOLS === 'true') {
|
||||
const { default: vueDevTools } = await import('vite-plugin-vue-devtools')
|
||||
plugins.push(vueDevTools())
|
||||
}
|
||||
|
||||
return {
|
||||
plugins,
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': fileURLToPath(new URL('./src', import.meta.url))
|
||||
@@ -51,4 +60,5 @@ export default defineConfig({
|
||||
optimizeDeps: {
|
||||
include: ['vue', 'vue-router']
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user