0.4.5 • Published 3 years ago

zerva-vite-plugin v0.4.5

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

🌱 Zerva Vite

DEPRECATED. Please use zerva-vite instead. Thanks.


This is a side project of Zerva

Integrate Zerva modules into vite.config.ts using this Vite Plugin.

This is perfect to use and test your server side code while developing the frontend without handling parallel launching and running server processes.

The plugin already calls useHttp with the same port as the vite process. In fact it is the same server instance Vite uses. Custom routes can be added or sockets get bound to it.

Get started

import { defineConfig } from "vite"
import vue from "@vitejs/plugin-vue"
import { useSocketIO } from "zerva-socketio"
import { viteZervaPlugin } from "./src/module"

export default defineConfig({
  plugins: [
    vue(),

    // Make use of Zerva from inside Vite server
    viteZervaPlugin(async () => {
      // Zerva modules
      useSocketIO()
    }),
  ],
})

See demo for a more complex example.

0.4.5

3 years ago

0.4.4

3 years ago

0.4.3

3 years ago

0.4.2

3 years ago

0.4.1

3 years ago

0.3.2

3 years ago

0.3.0

3 years ago

0.3.1

3 years ago

0.1.9

3 years ago

0.1.8

3 years ago