capsules plus a la ligne, site name MATHALLO wysiwyg style
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import { createServer, build } from 'vite'
|
||||
|
||||
// Build watcher : écrit les fichiers dist sur disque en continu
|
||||
const watcher = await build({
|
||||
build: { watch: {} },
|
||||
})
|
||||
|
||||
// Dev server : HMR sur localhost:5173
|
||||
const server = await createServer()
|
||||
await server.listen()
|
||||
|
||||
console.log('\n HMR actif + dist générés en watch\n')
|
||||
|
||||
const shutdown = async () => {
|
||||
await Promise.allSettled([
|
||||
watcher.close(),
|
||||
server.close(),
|
||||
])
|
||||
process.exit(0)
|
||||
}
|
||||
|
||||
process.on('SIGINT', shutdown)
|
||||
process.on('SIGTERM', shutdown)
|
||||
Reference in New Issue
Block a user