@vavite/expose-vite-dev-server v5.1.0
@vavite/expose-vite-dev-server
@vavite/expose-vite-dev-server
is a Vite plugin for exposing the Vite development server to user code during development. It can be used for accessing Vite development server methods such as ssrFixStacktrace
and transformIndexHtml
in vavite
, @vavite/connect
, and @vavite/reloader
applications.
Installation and usage
Install vite
and @vavite/expose-vite-dev-server
as development dependencies (npm install --save-dev vite @vavite/expose-vite-dev-server
) and add @vavite/expose-vite-dev-server
plugin to your Vite config:
import { defineConfig } from "vite";
import exposeViteDevServer from "@vavite/expose-vite-dev-server";
export default defineConfig({
plugins: [exposeViteDevServer()],
});
Now you can import the dev server in your application with import viteDevServer from @vavite/expose-vite-dev-server/vite-dev-server
during development. In production, it will be available but its value will be undefined
.
23 days ago
2 months ago
3 months ago
4 months ago
4 months ago
10 months ago
10 months ago
11 months ago
11 months ago
11 months ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago