project configuration

This commit is contained in:
Sylvain Schneider
2026-05-11 22:27:45 +02:00
parent d729a7a919
commit caf085310c
4 changed files with 60 additions and 26 deletions

View File

@@ -86,6 +86,57 @@ app.use(PrimeVue, {
app.mount('#app')
```
## Adaptation du Router
Modification du fichier ```src/router/index.js```
```ts
import { createRouter, createWebHashHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
const router = createRouter({
history: createWebHashHistory(),
routes: [
{
path: '/',
name: 'home',
component: HomeView,
},
],
})
export default router
```
Modification du fichier ```vite.config.js```
```ts
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(),
],
base: './',
build: {
// Optional: specify the output directory for the build
outDir: 'dist',
assetsDir: 'assets',
},
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
},
},
})
```
## Construction de l'application
```