npm create vite@latest mon-projet -- --template vue
cd mon-projet
npm install
npm install vue-router
createWebHistory
(pas hash) :createRouter({ history: createWebHistory(), routes })
<form name="contact" method="POST" data-netlify="true">
<input type="hidden" name="form-name" value="contact" />
<input type="text" name="nom" required />
<input type="email" name="email" required />
<textarea name="message" required></textarea>
<button type="submit">Envoyer</button>
</form>
_redirects
à la racine de public/
(ou ajouter dans dist/
après build) :/* /index.html 200
netlify.toml
:[build]
publish = "dist"
command = "npm run build"
[[redirects]]
from = "/*"
to = "/index.html"
status = 200
npm run build
dist
⚠ Points d’attention :
_redirects
ou netlify.toml
sinon tes routes plantent en direct name
name