project configuration
This commit is contained in:
51
install.md
51
install.md
@@ -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
|
||||
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user